Files
Mini-Nav/tests/conftest.py
SikongJueluo 2e0e36eea5 feat(sim): add CAM performance sweep test infrastructure
- hw/sim/tests/test_cam_perf.py: new cocotb perf test with bounded wait helpers
- scripts/sweep_cam_perf.py: sweep data model, matrix, and make command builders  
- tests/test_sweep_cam_perf.py: unit tests for sweep helpers
- tests/conftest.py: pytest path configuration for scripts package
- hw/sim/Makefile: deterministic noise params override for perf test compatibility
2026-05-16 15:42:29 +08:00

22 lines
715 B
Python
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""pytest configuration — ensure ``scripts/`` is importable via package syntax.
The ``scripts`` directory is a PEP420 implicit namespace package (no
``__init__.py``). Because ``uv run pytest`` does **not** add the project root
to ``sys.path``, ``from scripts.sweep_cam_perf import ...`` would otherwise
fail with ``ModuleNotFoundError``.
This conftest inserts the repository root at the front of ``sys.path`` so that
``scripts`` is discoverable as a top-level package.
"""
from __future__ import annotations
import sys
from pathlib import Path
_repo_root = Path(__file__).resolve().parent.parent
_repo_root_str = str(_repo_root)
if _repo_root_str not in sys.path:
sys.path.insert(0, _repo_root_str)