mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
Merge 3.6: Issue #28409: regrtest: fix the parser of command line arguments.
This commit is contained in:
commit
a506a93b0b
3 changed files with 21 additions and 4 deletions
|
@ -299,6 +299,15 @@ class ParseArgsTestCase(unittest.TestCase):
|
|||
self.assertEqual(ns.verbose, 0)
|
||||
self.assertEqual(ns.args, ['foo'])
|
||||
|
||||
def test_arg_option_arg(self):
|
||||
ns = libregrtest._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')
|
||||
|
||||
|
||||
class BaseTestCase(unittest.TestCase):
|
||||
TEST_UNIQUE_ID = 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue