Commit 7cd8b42f authored by R David Murray's avatar R David Murray

#9161: Fix test to use standard optparse test pattern (what was I thinking?)

parent 6bcd00af
......@@ -769,12 +769,12 @@ class TestStandard(BaseTest):
self.assertParseFail(["-test"],
"no such option: -e")
def test_flag_accepts_unicode(self):
try:
self.parser.add_option(u"-u", u"--unicode")
self.parser.parse_args()
except TypeError:
self.fail("Failed parsing flag passed to add_option() as unicode.")
def test_add_option_accepts_unicode(self):
self.parser.add_option(u"-u", u"--unicode", action="store_true")
self.assertParseOK(["-u"],
{'a': None, 'boo': None, 'foo': None, 'unicode': True},
[])
class TestBool(BaseTest):
def setUp(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment