summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2010-06-26 00:06:44 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2010-06-26 00:06:44 (GMT)
commit32e06811565cd8ed34fd980dc45157958e99bee1 (patch)
tree6a05295898680e0ac80070c856a47bbec74d5e71 /Lib
parentcf3e20c8e8f2942d526339104bc8b864537586b7 (diff)
downloadcpython-32e06811565cd8ed34fd980dc45157958e99bee1.zip
cpython-32e06811565cd8ed34fd980dc45157958e99bee1.tar.gz
cpython-32e06811565cd8ed34fd980dc45157958e99bee1.tar.bz2
#4640: add a test to optparse that proves issue is invalid.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_optparse.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_optparse.py b/Lib/test/test_optparse.py
index 162e9dd..3cc1426 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",