103
103
ui.stdout = tests.StringIOWrapper()
104
104
ui.stderr = tests.StringIOWrapper()
105
105
ui.stderr.encoding = ui.stdout.encoding = ui.stdin.encoding = 'utf8'
107
106
password = ui.get_password(u'Hello \u1234 %(user)s', user=u'some\u1234')
108
107
self.assertEqual(u'baz\u1234', password)
109
108
self.assertEqual(u'Hello \u1234 some\u1234: ',