This commit is contained in:
LASTA_DEV01\lasta
2026-05-13 19:57:34 +09:00
parent 2e9204243d
commit 9e88f4c7ad
4310 changed files with 48538 additions and 905279 deletions

View File

@@ -0,0 +1,33 @@
"""Shared fixtures for integration tests.
Sets up the Python path so `import platform.api.main` resolves the local
package (not the stdlib `platform` module) and exposes helpers that turn
the FastAPI app into a controllable test harness.
"""
from __future__ import annotations
import sys
from pathlib import Path
import pytest
REPO_ROOT = Path(__file__).resolve().parents[2]
if str(REPO_ROOT) not in sys.path:
sys.path.insert(0, str(REPO_ROOT))
VENDORED_ONTOCAST = REPO_ROOT / "vendored" / "ontocast"
if str(VENDORED_ONTOCAST) not in sys.path:
sys.path.insert(0, str(VENDORED_ONTOCAST))
@pytest.fixture
def fixtures_dir() -> Path:
return REPO_ROOT / "tests" / "fixtures"
@pytest.fixture
def sample_json_path(fixtures_dir: Path) -> Path:
path = fixtures_dir / "sample_cryogenics.json"
assert path.exists(), f"Missing fixture: {path}"
return path