MCPcopy Index your code
hub / github.com/RustPython/RustPython / list_cases

Function list_cases

Lib/test/libregrtest/findtests.py:90–110  ·  view source on GitHub ↗
(tests: TestTuple, *,
               match_tests: TestFilter | None = None,
               test_dir: StrPath | None = None)

Source from the content-addressed store, hash-verified

88 print(test.id())
89
90def list_cases(tests: TestTuple, *,
91 match_tests: TestFilter | None = None,
92 test_dir: StrPath | None = None) -> None:
93 support.verbose = False
94 set_match_tests(match_tests)
95
96 skipped = []
97 for test_name in tests:
98 module_name = abs_module_name(test_name, test_dir)
99 try:
100 suite = unittest.defaultTestLoader.loadTestsFromName(module_name)
101 _list_cases(suite)
102 except unittest.SkipTest:
103 skipped.append(test_name)
104
105 if skipped:
106 sys.stdout.flush()
107 stderr = sys.stderr
108 print(file=stderr)
109 print(count(len(skipped), "test"), "skipped:", file=stderr)
110 printlist(skipped, file=stderr)

Callers 1

mainMethod · 0.90

Calls 10

set_match_testsFunction · 0.85
abs_module_nameFunction · 0.85
_list_casesFunction · 0.85
countFunction · 0.85
lenFunction · 0.85
printlistFunction · 0.85
loadTestsFromNameMethod · 0.80
printFunction · 0.50
appendMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected