-
-
Notifications
You must be signed in to change notification settings - Fork 303
Expand file tree
/
Copy pathconftest.py
More file actions
29 lines (20 loc) · 845 Bytes
/
Copy pathconftest.py
File metadata and controls
29 lines (20 loc) · 845 Bytes
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
"""Root test configuration — fixtures available to all test modules."""
from __future__ import annotations
from pathlib import Path
import pytest
@pytest.fixture(scope="session")
def repo_root() -> Path:
"""Absolute path to the repository root."""
return Path(__file__).parent.parent
@pytest.fixture(scope="session")
def sample_repo_path(repo_root: Path) -> Path:
"""Path to the multi-language sample repository used in integration tests."""
path = repo_root / "tests" / "fixtures" / "sample_repo"
assert path.exists(), (
f"Sample repo not found at {path}. Run 'make install' to ensure test fixtures are in place."
)
return path
@pytest.fixture(scope="session")
def fixtures_dir(repo_root: Path) -> Path:
"""Path to the tests/fixtures/ directory."""
return repo_root / "tests" / "fixtures"