"""Test bootstrap: make the ``src`` layout importable. This is used by pytest. When running with the standard library test runner, pass the source tree explicitly, e.g.:: PYTHONPATH=src python3 -m unittest discover -s tests -t tests """ from __future__ import annotations import sys from pathlib import Path _SRC = Path(__file__).resolve().parents[1] / "src" if str(_SRC) not in sys.path: sys.path.insert(0, str(_SRC))