diff options
author | R. David Murray <rdmurray@bitdance.com> | 2010-06-26 00:06:44 +0000 |
---|---|---|
committer | R. David Murray <rdmurray@bitdance.com> | 2010-06-26 00:06:44 +0000 |
commit | 32e06811565cd8ed34fd980dc45157958e99bee1 (patch) | |
tree | 6a05295898680e0ac80070c856a47bbec74d5e71 /Lib/test/test_optparse.py | |
parent | cf3e20c8e8f2942d526339104bc8b864537586b7 (diff) | |
download | cpython-git-32e06811565cd8ed34fd980dc45157958e99bee1.tar.gz |
#4640: add a test to optparse that proves issue is invalid.
Diffstat (limited to 'Lib/test/test_optparse.py')
-rw-r--r-- | Lib/test/test_optparse.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_optparse.py b/Lib/test/test_optparse.py index 162e9ddef5..3cc142627d 100644 --- a/Lib/test/test_optparse.py +++ b/Lib/test/test_optparse.py @@ -764,6 +764,11 @@ class TestStandard(BaseTest): {'a': "-b3", 'boo': None, 'foo': None}, []) + def test_combined_single_invalid_option(self): + self.parser.add_option("-t", action="store_true") + self.assertParseFail(["-test"], + "no such option: -e") + class TestBool(BaseTest): def setUp(self): options = [make_option("-v", |