mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
Fix minor issue in implementation of issue 10470.
This commit is contained in:
parent
b3468f79ef
commit
f100dbd600
3 changed files with 54 additions and 30 deletions
|
|
@ -231,6 +231,19 @@ class TestDiscovery(unittest.TestCase):
|
|||
program.parseArgs(['something'])
|
||||
self.assertTrue(self.called)
|
||||
|
||||
def test_command_line_handling_discover_by_default_with_options(self):
|
||||
program = TestableTestProgram()
|
||||
program.module = None
|
||||
|
||||
args = ['something', '-v', '-b', '-v', '-c', '-f']
|
||||
self.called = False
|
||||
def do_discovery(argv):
|
||||
self.called = True
|
||||
self.assertEqual(argv, args[1:])
|
||||
program._do_discovery = do_discovery
|
||||
program.parseArgs(args)
|
||||
self.assertTrue(self.called)
|
||||
|
||||
|
||||
def test_command_line_handling_do_discovery_too_many_arguments(self):
|
||||
class Stop(Exception):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue