File size: 853 Bytes
8f6d79d ffb5352 8f6d79d ffb5352 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | """Pytest configuration."""
from __future__ import annotations
import sys
from pathlib import Path
import pytest
ROOT = Path(__file__).resolve().parent.parent
if str(ROOT) not in sys.path:
sys.path.insert(0, str(ROOT))
@pytest.fixture(autouse=True)
def fixed_structure(monkeypatch):
"""Pin structural rotation off so assertions can name one exact rewrite.
Production picks a different valid structure per request. Tests that cover
that behaviour opt back in with the ``structural_variation`` fixture.
"""
from app.engine import orchestrator
monkeypatch.setattr(orchestrator, "ENGINE_STRUCTURAL_VARIATION", False)
@pytest.fixture
def structural_variation(monkeypatch):
from app.engine import orchestrator
monkeypatch.setattr(orchestrator, "ENGINE_STRUCTURAL_VARIATION", True)
|