Scrypt / tests /conftest.py
IMJONEZZ's picture
SCRYPT: initial commit — game, sandbox, Warden, Space web layer
9fca766
Raw
History Blame Contribute Delete
635 Bytes
"""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"