148
148
self.assertRaises(ValueError, factory.choose, u"", u"&choice1\nchoi&ce2")
157
self.assertEqual("prompt ([y]es, [N]o, more [i]nfo): \n", factory.stderr.getvalue())
161
self.assertEqual("prompt ([y]es, [N]o, [m]ore info): \n", factory.stderr.getvalue())
150
163
def test_text_ui_choose_return_values(self):
151
164
choose = lambda: factory.choose(u"", u"&Yes\n&No\nMaybe\nmore &info", 3)
152
165
stdin = tests.StringIOWrapper("y\n" # 0