Issue #25220: Create Lib/test/libregrtest/

Start to split regrtest.py into smaller parts with the creation of
Lib/test/libregrtest/cmdline.py: code to handle the command line, especially
parsing command line arguments. This part of the code is tested by
test_regrtest.
This commit is contained in:
Victor Stinner 2015-09-26 09:43:45 +02:00
parent e055b88937
commit 98de5340d4
4 changed files with 345 additions and 332 deletions

View file

@ -7,7 +7,7 @@ import faulthandler
import getopt
import os.path
import unittest
from test import regrtest, support
from test import regrtest, support, libregrtest
class ParseArgsTestCase(unittest.TestCase):
@ -148,7 +148,7 @@ class ParseArgsTestCase(unittest.TestCase):
self.assertEqual(ns.use_resources, ['gui', 'network'])
ns = regrtest._parse_args([opt, 'gui,none,network'])
self.assertEqual(ns.use_resources, ['network'])
expected = list(regrtest.RESOURCE_NAMES)
expected = list(libregrtest.RESOURCE_NAMES)
expected.remove('gui')
ns = regrtest._parse_args([opt, 'all,-gui'])
self.assertEqual(ns.use_resources, expected)