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

Function path_to_test_parts

scripts/update_lib/cmd_auto_mark.py:239–250  ·  view source on GitHub ↗

Extract [ClassName, method_name] from test path. Args: path: Test path like "test.module_name.ClassName.test_method" Returns: [ClassName, method_name] - last 2 elements

(path: str)

Source from the content-addressed store, hash-verified

237
238
239def path_to_test_parts(path: str) -> list[str]:
240 """
241 Extract [ClassName, method_name] from test path.
242
243 Args:
244 path: Test path like "test.module_name.ClassName.test_method"
245
246 Returns:
247 [ClassName, method_name] - last 2 elements
248 """
249 parts = path.split(".")
250 return parts[-2:]
251
252
253def _expand_stripped_to_children(

Callers 3

test_simple_pathMethod · 0.90
test_nested_pathMethod · 0.90
collect_test_changesFunction · 0.85

Calls 1

splitMethod · 0.45

Tested by 2

test_simple_pathMethod · 0.72
test_nested_pathMethod · 0.72