Merge 3.6: Issue #28409: regrtest: fix the parser of command line arguments.

This commit is contained in:
Victor Stinner 2016-10-17 18:13:46 +02:00
commit a506a93b0b
3 changed files with 21 additions and 4 deletions

View file

@ -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