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

Function get_test_files

scripts/update_lib/file_utils.py:124–128  ·  view source on GitHub ↗

Get all .py test files in a path (file or directory).

(path: pathlib.Path)

Source from the content-addressed store, hash-verified

122
123
124def get_test_files(path: pathlib.Path) -> list[pathlib.Path]:
125 """Get all .py test files in a path (file or directory)."""
126 if path.is_file():
127 return [path]
128 return sorted(path.glob("**/*.py"))
129
130
131def get_test_module_name(test_path: pathlib.Path) -> str:

Callers 4

collect_original_methodsFunction · 0.90
test_single_fileMethod · 0.90
test_directoryMethod · 0.90
test_nested_directoryMethod · 0.90

Calls 3

sortedFunction · 0.85
is_fileMethod · 0.45
globMethod · 0.45

Tested by 3

test_single_fileMethod · 0.72
test_directoryMethod · 0.72
test_nested_directoryMethod · 0.72