MCPcopy Index your code
hub / github.com/DeepLabCut/DeepLabCut / load_selector_module

Function load_selector_module

tests/tools/conftest.py:16–33  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14
15
16def load_selector_module() -> ModuleType:
17 root = _repo_root()
18 tools_dir = root / "tools"
19 init_file = tools_dir / "__init__.py"
20 selector_path = tools_dir / "test_selector.py"
21
22 if not selector_path.exists():
23 raise FileNotFoundError(f"Selector script not found: {selector_path}")
24
25 if not init_file.exists():
26 raise FileNotFoundError(f"tools package marker not found: {init_file}")
27
28 # Ensure repo root is importable so `tools.test_selector` resolves as a package import.
29 root_str = str(root)
30 if root_str not in sys.path:
31 sys.path.insert(0, root_str)
32
33 return importlib.import_module("tools.test_selector")
34
35
36@pytest.fixture(scope="session")

Callers 1

selectorFunction · 0.85

Calls 2

_repo_rootFunction · 0.85
insertMethod · 0.80

Tested by

no test coverage detected