Download tests/conftest.py from devrup404/SignalMod: direct link, hf CLI and curl.
- Browser
- Download file 981 Bytes
-
https://huggingface.co/spaces/devrup404/SignalMod/resolve/c2dca5134d67b02cdcdc22bb21994f31996a1715/tests/conftest.py
- Command line
-
hf download hf://spaces/devrup404/SignalMod@c2dca5134d67b02cdcdc22bb21994f31996a1715/tests/conftest.py
-
curl -L -o conftest.py https://huggingface.co/spaces/devrup404/SignalMod/resolve/c2dca5134d67b02cdcdc22bb21994f31996a1715/tests/conftest.py
981 Bytes
| """Fixtures compartidas para tests del proyecto.""" | |
| import os | |
| import sys | |
| from pathlib import Path | |
| import pytest | |
| PROJECT_ROOT = Path(__file__).resolve().parents[1] | |
| if str(PROJECT_ROOT) not in sys.path: | |
| sys.path.insert(0, str(PROJECT_ROOT)) | |
| def _project_cwd(): | |
| """Los módulos y configs usan rutas relativas al root del repo.""" | |
| prev = os.getcwd() | |
| os.chdir(PROJECT_ROOT) | |
| yield | |
| os.chdir(prev) | |
| def project_root() -> Path: | |
| return PROJECT_ROOT | |
| def features_config(project_root: Path) -> str: | |
| return str(project_root / "configs" / "features.yaml") | |
| def models_config(project_root: Path) -> str: | |
| return str(project_root / "configs" / "models.yaml") | |
| def best_params_config(project_root: Path) -> str: | |
| return str(project_root / "configs" / "best_params.yaml") | |