mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
#9161: Fix test to use standard optparse test pattern (what was I thinking?)
This commit is contained in:
parent
6bcd00afa9
commit
7cd8b42f32
1 changed files with 6 additions and 6 deletions
|
@ -769,12 +769,12 @@ class TestStandard(BaseTest):
|
||||||
self.assertParseFail(["-test"],
|
self.assertParseFail(["-test"],
|
||||||
"no such option: -e")
|
"no such option: -e")
|
||||||
|
|
||||||
def test_flag_accepts_unicode(self):
|
def test_add_option_accepts_unicode(self):
|
||||||
try:
|
self.parser.add_option(u"-u", u"--unicode", action="store_true")
|
||||||
self.parser.add_option(u"-u", u"--unicode")
|
self.assertParseOK(["-u"],
|
||||||
self.parser.parse_args()
|
{'a': None, 'boo': None, 'foo': None, 'unicode': True},
|
||||||
except TypeError:
|
[])
|
||||||
self.fail("Failed parsing flag passed to add_option() as unicode.")
|
|
||||||
|
|
||||||
class TestBool(BaseTest):
|
class TestBool(BaseTest):
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue