Spaces:
Runtime error
Runtime error
Download tests/conftest.py from Cnass/sprite: direct link, hf CLI and curl.
- Browser
- Download file 345 Bytes
-
https://huggingface.co/spaces/Cnass/sprite/resolve/main/tests/conftest.py
- Command line
-
hf download hf://spaces/Cnass/sprite/tests/conftest.py
-
curl -L -o conftest.py https://huggingface.co/spaces/Cnass/sprite/resolve/main/tests/conftest.py
345 Bytes
| """ | |
| tests/conftest.py | |
| ------------------- | |
| Makes the project root importable from every test file (so `from | |
| segmentation import ...` etc. work regardless of where pytest is invoked | |
| from), without needing the project installed as a package. | |
| """ | |
| import sys | |
| from pathlib import Path | |
| sys.path.insert(0, str(Path(__file__).resolve().parent.parent)) | |