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

Method list_test_dirs

Lib/test/test_tools/test_makefile.py:19–36  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

17
18class TestMakefile(unittest.TestCase):
19 def list_test_dirs(self):
20 result = []
21 found_testsubdirs = False
22 with open(MAKEFILE, 'r', encoding='utf-8') as f:
23 for line in f:
24 if line.startswith('TESTSUBDIRS='):
25 found_testsubdirs = True
26 result.append(
27 line.removeprefix('TESTSUBDIRS=').replace(
28 '\\', '',
29 ).strip(),
30 )
31 continue
32 if found_testsubdirs:
33 if '\t' not in line:
34 break
35 result.append(line.replace('\\', '').strip())
36 return result
37
38 @unittest.skipUnless(support.TEST_MODULES_ENABLED, "requires test modules")
39 def test_makefile_test_folders(self):

Callers 1

Calls 6

openFunction · 0.50
startswithMethod · 0.45
appendMethod · 0.45
stripMethod · 0.45
replaceMethod · 0.45
removeprefixMethod · 0.45

Tested by

no test coverage detected