gh-111165: Move test running code from test.support to libregrtest (GH-111166)

Remove no longer used functions run_unittest() and run_doctest() from
the test.support module.
This commit is contained in:
Serhiy Storchaka 2023-10-25 12:41:21 +03:00 committed by GitHub
parent a8a89fcd1f
commit f6a45a03d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 266 additions and 342 deletions

View file

@ -4,6 +4,7 @@ import unittest
from test import support
from .filter import match_test, set_match_tests
from .utils import (
StrPath, TestName, TestTuple, TestList, TestFilter,
abs_module_name, count, printlist)
@ -79,14 +80,14 @@ def _list_cases(suite):
if isinstance(test, unittest.TestSuite):
_list_cases(test)
elif isinstance(test, unittest.TestCase):
if support.match_test(test):
if match_test(test):
print(test.id())
def list_cases(tests: TestTuple, *,
match_tests: TestFilter | None = None,
test_dir: StrPath | None = None):
support.verbose = False
support.set_match_tests(match_tests)
set_match_tests(match_tests)
skipped = []
for test_name in tests: