Spaces:
Running on Zero
Running on Zero
Download conftest.py from dipta007/OracleZoom: direct link, hf CLI and curl.
- Browser
- Download file 457 Bytes
-
https://huggingface.co/spaces/dipta007/OracleZoom/resolve/main/conftest.py
- Command line
-
hf download hf://spaces/dipta007/OracleZoom/conftest.py
-
curl -L -o conftest.py https://huggingface.co/spaces/dipta007/OracleZoom/resolve/main/conftest.py
457 Bytes
| """Run the tests the way the Space runs: this directory on the path and as the working | |
| directory, because app.py refers to `samples/...` relatively, as a Space should.""" | |
| import os | |
| import sys | |
| import pytest | |
| HERE = os.path.dirname(os.path.abspath(__file__)) | |
| if HERE not in sys.path: | |
| sys.path.insert(0, HERE) | |
| def _cwd_is_the_space(): | |
| prev = os.getcwd() | |
| os.chdir(HERE) | |
| yield | |
| os.chdir(prev) | |