"""Common fixtures for crystflux v1 tests."""

import json
from pathlib import Path
from typing import Any

import pytest


@pytest.fixture(scope="session")
def tao_data() -> dict[str, Any] | Any:
    """Load Taoist test data from JSON file (session-scoped for performance)."""
    path = Path(__file__).parent.parent / "data" / "taoist.json"
    return json.loads(path.read_text())


@pytest.fixture
def enable_dream_mode():
    """Fixture that enables dream mode for the duration of a test."""
    from crystflux.v1.adapters import enable_dream_mode

    with enable_dream_mode():
        yield
