Skip to content

Commit 794eab5

Browse files
committed
Add: Unit tests
1 parent 9ca886b commit 794eab5

33 files changed

+4277
-26
lines changed

tests/tests/conftests.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import pytest
2+
from pathlib import Path
3+
4+
@pytest.fixture(autouse=True)
5+
def ensure_local_package(monkeypatch):
6+
"""
7+
Ensure tests import the local `src` copy of the package when running in the repo.
8+
If you installed the package editable (`pip install -e .`) this is a no-op.
9+
"""
10+
repo_root = Path(__file__).resolve().parents[2]
11+
src = repo_root / "src"
12+
if src.exists():
13+
# Prepend src to sys.path so imports resolve to local code
14+
import sys
15+
sys.path.insert(0, str(src))
16+
yield
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)