This commit is contained in:
Your Name
2026-06-25 21:31:35 -06:00
parent 4703476c89
commit 99971b804d
7 changed files with 152 additions and 169 deletions

View File

@@ -1,10 +1,10 @@
import io
import json
import os
import tempfile
from pathlib import Path
import pytest
import yaml
from PIL import Image as PILImage
from spectra.web.server import create_app
@@ -18,11 +18,16 @@ def app():
with tempfile.TemporaryDirectory() as tmpdir:
tmp = Path(tmpdir)
cache_dir = tmp / "cache"
config_path = tmp / "config.yaml"
# Write a minimal config so ConfigManager writes into the temp dir
with open(config_path, "w") as f:
yaml.dump({"display": {"saturation": 0.5}}, f)
old_environ = os.environ.get("SPECTRA_CACHE_DIR")
os.environ["SPECTRA_CACHE_DIR"] = str(cache_dir)
app = create_app()
app = create_app(config_path=str(config_path))
yield app