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

Function is_test_path

scripts/update_lib/file_utils.py:81–84  ·  view source on GitHub ↗

Check if path is a test path (contains /Lib/test/ or starts with Lib/test/)

(path: pathlib.Path)

Source from the content-addressed store, hash-verified

79
80
81def is_test_path(path: pathlib.Path) -> bool:
82 """Check if path is a test path (contains /Lib/test/ or starts with Lib/test/)"""
83 path_str = str(path).replace("\\", "/")
84 return "/Lib/test/" in path_str or path_str.startswith("Lib/test/")
85
86
87def lib_to_test_path(src_path: pathlib.Path) -> pathlib.Path:

Callers 4

mainFunction · 0.90
test_lib_test_pathMethod · 0.90

Calls 3

strFunction · 0.85
replaceMethod · 0.45
startswithMethod · 0.45

Tested by 3

test_lib_test_pathMethod · 0.72