"""Shared fixtures for the `.sientia` bundle tests.""" from pathlib import Path import pytest FIXTURE_DIR = Path(__file__).resolve().parents[3] / 'fixtures' / 'bundle' GOLDEN_BUNDLE = FIXTURE_DIR / 'golden_model_v3.sientia' GOLDEN_METADATA = FIXTURE_DIR / 'golden_model_v3.metadata.json' # Recorded in tests/fixtures/bundle/README.md; the fixture protects nothing. GOLDEN_PASSWORD = 'Import1Model!Fixture' @pytest.fixture def golden_bundle() -> Path: """The `.sientia` file the real producer emitted.""" assert GOLDEN_BUNDLE.is_file(), ( f'golden fixture missing: {GOLDEN_BUNDLE} — regenerate it with ' 'tests/fixtures/bundle/regenerate.py' ) return GOLDEN_BUNDLE @pytest.fixture def golden_password() -> str: return GOLDEN_PASSWORD @pytest.fixture def work_dir(tmp_path: Path) -> Path: """A per-test stand-in for `IMPORT_WORK_DIR/`.""" root = tmp_path / 'workflow-id' root.mkdir() return root