MCPcopy Index your code
hub / github.com/python/cpython / split_test_packages

Function split_test_packages

Lib/test/libregrtest/findtests.py:66–79  ·  view source on GitHub ↗
(tests, *, testdir: StrPath | None = None,
                        exclude: Container[str] = (),
                        split_test_dirs=SPLITTESTDIRS)

Source from the content-addressed store, hash-verified

64
65
66def split_test_packages(tests, *, testdir: StrPath | None = None,
67 exclude: Container[str] = (),
68 split_test_dirs=SPLITTESTDIRS) -> list[TestName]:
69 testdir = findtestdir(testdir)
70 splitted = []
71 for name in tests:
72 if name in split_test_dirs:
73 subdir = os.path.join(testdir, name)
74 splitted.extend(findtests(testdir=subdir, exclude=exclude,
75 split_test_dirs=split_test_dirs,
76 base_mod=name))
77 else:
78 splitted.append(name)
79 return splitted
80
81
82def _list_cases(suite: unittest.TestSuite) -> None:

Callers 1

find_testsMethod · 0.90

Calls 5

findtestdirFunction · 0.85
findtestsFunction · 0.85
joinMethod · 0.45
extendMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…