Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Download tests/conftest.py from treble-technologies/ffasr: direct link, hf CLI and curl.
- Browser
- Download file 869 Bytes
-
https://huggingface.co/spaces/treble-technologies/ffasr/resolve/main/tests/conftest.py
- Command line
-
hf download hf://spaces/treble-technologies/ffasr/tests/conftest.py
-
curl -L -o conftest.py https://huggingface.co/spaces/treble-technologies/ffasr/resolve/main/tests/conftest.py
869 Bytes
| """Keep tests off the production bucket and off the Hub Jobs API.""" | |
| from __future__ import annotations | |
| import os | |
| import sys | |
| from pathlib import Path | |
| ROOT = Path(__file__).resolve().parents[1] | |
| if str(ROOT) not in sys.path: | |
| sys.path.insert(0, str(ROOT)) | |
| os.environ["FFASR_BUCKET_ID"] = "dev/test-bucket" | |
| # No Hub lookups for model lineage (lineage.fill_base_model) during tests. | |
| os.environ["FFASR_LINEAGE_LOOKUP"] = "0" | |
| for _name in ( | |
| "HF_TOKEN", | |
| "ds_token", | |
| "FFASR_REMOTE_JOBS", | |
| "FFASR_ALLOW_PROD_WRITES", | |
| "SPACE_ID", | |
| "FFASR_SPACE_JOB_ID", | |
| "FFASR_MODERATION", | |
| "FFASR_MODERATOR_SECRET", | |
| "FFASR_JOBS_READ_TOKEN", | |
| "FFASR_ARTIFACTS_REPO", | |
| "FFASR_ARTIFACTS_TOKEN", | |
| "FFASR_ALLOW_REMOTE_CODE", | |
| "FFASR_DEFAULT_ALLOW_REMOTE_CODE", | |
| "token_for_ffasr_jobs", | |
| "FFASR_JOBS_TOKEN", | |
| ): | |
| os.environ.pop(_name, None) | |