]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 82233,82242 via svnmerge from
authorR. David Murray <rdmurray@bitdance.com>
Sat, 26 Jun 2010 03:32:13 +0000 (03:32 +0000)
committerR. David Murray <rdmurray@bitdance.com>
Sat, 26 Jun 2010 03:32:13 +0000 (03:32 +0000)
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.
........
  r82242 | r.david.murray | 2010-06-25 23:27:32 -0400 (Fri, 25 Jun 2010) | 2 lines

  Fix indentation in recently added test.
........

Lib/test/test_optparse.py

index 5f585a6d7b9ee8a2b0039b6328a388e9c31c222a..641f37d67085199b73d0ae17d04d80734b3887c4 100644 (file)
@@ -772,6 +772,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",