From: R. David Murray Date: Sat, 26 Jun 2010 00:06:44 +0000 (+0000) Subject: #4640: add a test to optparse that proves issue is invalid. X-Git-Tag: v2.7~64 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=32e06811565cd8ed34fd980dc45157958e99bee1;p=thirdparty%2FPython%2Fcpython.git #4640: add a test to optparse that proves issue is invalid. --- diff --git a/Lib/test/test_optparse.py b/Lib/test/test_optparse.py index 162e9ddef58c..3cc142627d71 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",