()
| 14 | |
| 15 | |
| 16 | def 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") |
no test coverage detected