cpython: 4c86a860e3d2 (original) (raw)
Mercurial > cpython
changeset 78555:4c86a860e3d2 2.7
#9161: add test for the bug fixed by r82581. Patch by Michael Johnson. [#9161]
R David Murray rdmurray@bitdance.com | |
---|---|
date | Mon, 13 Aug 2012 22:04:30 -0400 |
parents | c863dadc65eb |
children | e4fe1daef9f7 |
files | Lib/test/test_optparse.py |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-)[+] [-] Lib/test/test_optparse.py 7 |
line wrap: on
line diff
--- 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:[](#l1.8)
self.parser.add_option(u"-u", u"--unicode")[](#l1.9)
self.parser.parse_args()[](#l1.10)
except TypeError:[](#l1.11)
self.fail("Failed parsing flag passed to add_option() as unicode.")[](#l1.12)
+ class TestBool(BaseTest): def setUp(self): options = [make_option("-v",