Spaces:
Runtime error
Runtime error
Download code-review-env/tests/conftest.py from DeepParmar/code-review: direct link, hf CLI and curl.
- Browser
- Download file 379 Bytes
-
https://huggingface.co/spaces/DeepParmar/code-review/resolve/main/code-review-env/tests/conftest.py
- Command line
-
hf download hf://spaces/DeepParmar/code-review/code-review-env/tests/conftest.py
-
curl -L -o conftest.py https://huggingface.co/spaces/DeepParmar/code-review/resolve/main/code-review-env/tests/conftest.py
379 Bytes
| """Pytest configuration to ensure imports work from the package root.""" | |
| from __future__ import annotations | |
| import sys | |
| from pathlib import Path | |
| def pytest_configure() -> None: | |
| """Add `code-review-env/` to sys.path for test imports.""" | |
| repo_root = Path(__file__).resolve().parents[1] | |
| if str(repo_root) not in sys.path: | |
| sys.path.insert(0, str(repo_root)) | |