Files
DemonGatanjieuandClaude Opus 5.5 6a9f2f7ed4 Tests: side files beside the model whatever this computer chose
With Settings set to the hidden .amb folder on this computer, nine tests
read the real api/config.json and looked for side files in the wrong
place. tests/isolated_layout.py points model_sidecars at no config, so
the tests that write side files always get the default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 01:54:05 +08:00

14 lines
499 B
Python

"""Tests never read this computer's settings: side files (model_sidecars.py) go beside the model,
whatever api/config.json on this computer says. Imported by the tests that write side files."""
import os
import sys
import tempfile
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
import model_sidecars # noqa: E402
model_sidecars.CONFIG_PATH = os.path.join(tempfile.gettempdir(), "anomalous-tests-have-no-config.json")
model_sidecars._layout["mtime"] = None