mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
Issue #28409: regrtest: fix the parser of command line arguments.
This commit is contained in:
parent
5493e4723a
commit
1f6b69b749
3 changed files with 21 additions and 6 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue