mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-110918: regrtest: allow to intermix --match and --ignore options (GH-110919)
Test case matching patterns specified by options --match, --ignore, --matchfile and --ignorefile are now tested in the order of specification, and the last match determines whether the test case be run or ignored.
This commit is contained in:
parent
b578e51f02
commit
9a1fe09622
12 changed files with 128 additions and 143 deletions
|
@ -5,7 +5,7 @@ import unittest
|
|||
from test import support
|
||||
|
||||
from .utils import (
|
||||
StrPath, TestName, TestTuple, TestList, FilterTuple,
|
||||
StrPath, TestName, TestTuple, TestList, TestFilter,
|
||||
abs_module_name, count, printlist)
|
||||
|
||||
|
||||
|
@ -83,11 +83,10 @@ def _list_cases(suite):
|
|||
print(test.id())
|
||||
|
||||
def list_cases(tests: TestTuple, *,
|
||||
match_tests: FilterTuple | None = None,
|
||||
ignore_tests: FilterTuple | None = None,
|
||||
match_tests: TestFilter | None = None,
|
||||
test_dir: StrPath | None = None):
|
||||
support.verbose = False
|
||||
support.set_match_tests(match_tests, ignore_tests)
|
||||
support.set_match_tests(match_tests)
|
||||
|
||||
skipped = []
|
||||
for test_name in tests:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue