Files
livef12rocks/tests/conftest.py
T
Frank Schwenk c29186a227 test: add characterization tests for core modules
33 tests covering env/io helpers, config parsers, pipeline meta I/O,
worker inbox logic, and FastAPI smoke routes. No gmic/rembg subprocesses.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-18 17:12:09 +02:00

27 lines
897 B
Python

"""Shared test fixtures."""
from __future__ import annotations
from pathlib import Path
import pytest
@pytest.fixture
def data_dir(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> Path:
"""Point config path constants at a temporary data directory."""
variants = tmp_path / "variants"
intermediates = tmp_path / "intermediates"
meta = tmp_path / "meta"
inbox = tmp_path / "incoming"
for directory in (variants, intermediates, meta, inbox):
directory.mkdir()
monkeypatch.setattr("app.config.DATA_DIR", tmp_path)
monkeypatch.setattr("app.config.VARIANTS_DIR", variants)
monkeypatch.setattr("app.config.INTERMEDIATES_DIR", intermediates)
monkeypatch.setattr("app.config.META_DIR", meta)
monkeypatch.setattr("app.config.INBOX_DIR", inbox)
monkeypatch.setattr("app.config.PROCESSED_FILE", tmp_path / "processed.json")
return tmp_path