mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
bpo-30523: regrtest --list-cases --match (#2401)
* regrtest --list-cases now supports --match and --match-file options. Example: ./python -m test --list-cases -m FileTests test_os * --list-cases now also sets support.verbose to False to prevent messages to stdout when loading test modules. * Add support._match_test() private function.
This commit is contained in:
parent
8c78aa70c8
commit
ace56d5836
3 changed files with 32 additions and 15 deletions
|
@ -256,9 +256,13 @@ class Regrtest:
|
|||
if isinstance(test, unittest.TestSuite):
|
||||
self._list_cases(test)
|
||||
elif isinstance(test, unittest.TestCase):
|
||||
print(test.id())
|
||||
if support._match_test(test):
|
||||
print(test.id())
|
||||
|
||||
def list_cases(self):
|
||||
support.verbose = False
|
||||
support.match_tests = self.ns.match_tests
|
||||
|
||||
for test in self.selected:
|
||||
abstest = get_abs_module(self.ns, test)
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue