Spaces:
Running on Zero
Running on Zero
| """Suite-wide guards. | |
| Force the scripted backend so tests never spawn a real llama-server on a | |
| machine that happens to have the model installed (22GB load per test would | |
| be a memorable mistake). Tests that exercise backend selection set their | |
| own SCRYPT_* env explicitly via monkeypatch. | |
| """ | |
| import os | |
| import tempfile | |
| os.environ["SCRYPT_BACKEND"] = "scripted" | |
| # Keep anything the game persists (legacy.json, logs) out of the real ~/.scrypt. | |
| os.environ["SCRYPT_HOME"] = tempfile.mkdtemp(prefix="scrypt-test-home-") | |
| # Animations resolve instantly under test; timing never leaks into asserts. | |
| os.environ["SCRYPT_REDUCED_MOTION"] = "1" | |