diff options
| author | R David Murray <rdmurray@bitdance.com> | 2012-08-14 02:04:30 (GMT) |
|---|---|---|
| committer | R David Murray <rdmurray@bitdance.com> | 2012-08-14 02:04:30 (GMT) |
| commit | fe9efc57327b6306c5b755fae8ad6729484adcd4 (patch) | |
| tree | 5b21b7d3051afcf9acf3c98ba1b84c4905255386 /Lib/test/test_optparse.py | |
| parent | bc77d3690b4b0c9dbb8a00b15cfea74c4bdb134f (diff) | |
| download | cpython-fe9efc57327b6306c5b755fae8ad6729484adcd4.zip cpython-fe9efc57327b6306c5b755fae8ad6729484adcd4.tar.gz cpython-fe9efc57327b6306c5b755fae8ad6729484adcd4.tar.bz2 | |
#9161: add test for the bug fixed by r82581.
Patch by Michael Johnson.
Diffstat (limited to 'Lib/test/test_optparse.py')
| -rw-r--r-- | Lib/test/test_optparse.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_optparse.py b/Lib/test/test_optparse.py index f86ea01..59f752e 100644 --- a/Lib/test/test_optparse.py +++ b/Lib/test/test_optparse.py @@ -769,6 +769,13 @@ 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.") + class TestBool(BaseTest): def setUp(self): options = [make_option("-v", |
