Spaces:
Sleeping
Sleeping
| """Shared pytest fixtures / path setup. | |
| Adds the project root to ``sys.path`` so tests can be run from any | |
| working directory (including ``pytest`` invoked directly in the | |
| ``tests/`` folder). | |
| """ | |
| from __future__ import annotations | |
| import sys | |
| from pathlib import Path | |
| PROJECT_ROOT = Path(__file__).resolve().parent.parent | |
| if str(PROJECT_ROOT) not in sys.path: | |
| sys.path.insert(0, str(PROJECT_ROOT)) | |