diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-10-17 16:11:03 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-10-17 16:11:03 (GMT) |
commit | 1f6b69b74996164be5f13dea34242edc14bd87a1 (patch) | |
tree | b1b50209870de40fc64e71aacc84b8a9785c3266 /Lib/test/test_regrtest.py | |
parent | 5493e4723a922b9905cf6916363e72109a531cfd (diff) | |
download | cpython-1f6b69b74996164be5f13dea34242edc14bd87a1.zip cpython-1f6b69b74996164be5f13dea34242edc14bd87a1.tar.gz cpython-1f6b69b74996164be5f13dea34242edc14bd87a1.tar.bz2 |
Issue #28409: regrtest: fix the parser of command line arguments.
Diffstat (limited to 'Lib/test/test_regrtest.py')
-rw-r--r-- | Lib/test/test_regrtest.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py index a398a4f..ae18327 100644 --- a/Lib/test/test_regrtest.py +++ b/Lib/test/test_regrtest.py @@ -270,6 +270,16 @@ class ParseArgsTestCase(unittest.TestCase): self.assertEqual(ns.verbose, 0) self.assertEqual(ns.args, ['foo']) + def test_arg_option_arg(self): + ns = regrtest._parse_args(['test_unaryop', '-v', 'test_binop']) + self.assertEqual(ns.verbose, 1) + self.assertEqual(ns.args, ['test_unaryop', 'test_binop']) + + def test_unknown_option(self): + self.checkError(['--unknown-option'], + 'unrecognized arguments: --unknown-option') + + if __name__ == '__main__': unittest.main() |