mirror of
https://github.com/SikongJueluo/Mini-Nav.git
synced 2026-07-12 20:15:31 +08:00
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
This commit is contained in:
21
tests/conftest.py
Normal file
21
tests/conftest.py
Normal file
@@ -0,0 +1,21 @@
|
||||
"""pytest configuration — ensure ``scripts/`` is importable via package syntax.
|
||||
|
||||
The ``scripts`` directory is a PEP 420 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)
|
||||
Reference in New Issue
Block a user