diff Lib/test/test_optparse.py @ 62506:cb6d9bd559ef

Merged revisions 82233 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r82233 | r.david.murray | 2010-06-25 20:06:44 -0400 (Fri, 25 Jun 2010) | 2 lines #4640: add a test to optparse that proves issue is invalid. ........
author R. David Murray <rdmurray@bitdance.com>
date Sat, 26 Jun 2010 00:17:12 +0000
parents b93cfafcdcad
children d171276ed76d
line wrap: on
line diff
--- a/Lib/test/test_optparse.py	Fri Jun 25 23:37:15 2010 +0000
+++ b/Lib/test/test_optparse.py	Sat Jun 26 00:17:12 2010 +0000
@@ -754,6 +754,11 @@
                            {'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",