From f8f08076eb497ce2e8f8ca17ce296002c647cf21 Mon Sep 17 00:00:00 2001 From: rUv Date: Tue, 2 Jun 2026 18:12:00 +0200 Subject: [PATCH] =?UTF-8?q?fix(ci):=20perf=20tests=20=E2=80=94=20use=20`py?= =?UTF-8?q?thon=20-m=20pytest`=20so=20`src`=20import=20resolves=20(#914)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Performance Tests job collected 26 items then aborted with `ModuleNotFoundError: No module named 'src'` on test_frame_budget.py, which does `from src.core.csi_processor import CSIProcessor`. The bare `pytest` console script does not put the cwd (archive/v1) on sys.path; `python -m pytest` does. pytest aborts the whole session on a collection error, so this one import masked the entire (otherwise mock-based, self-contained) perf suite. Verified locally: bare-script path reproduces the exact error; `-m` resolves it and test_frame_budget.py passes 3/3. The other two files (test_api_throughput.py mock server, test_inference_speed.py MockPoseModel +psutil) are fully self-contained — no test hits the running server. Closes the last red job in the v1-API CI chain (#910/#911/#913). --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3bfd7269..1d56b58b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -288,7 +288,11 @@ jobs: # command always failed with "Could not find ...". Run the real suite. # -o addopts="" drops the root pyproject's --cov/--cov-fail-under=100 # flags (pytest-cov isn't installed here and 100% cov is for unit tests). - pytest tests/performance/ -o addopts="" -v --junitxml=perf-junit.xml + # `python -m pytest` (not the bare `pytest` script) puts the cwd + # (archive/v1) on sys.path so test_frame_budget.py's `from src.core...` + # import resolves — the bare script omits cwd and raises + # ModuleNotFoundError: No module named 'src'. + python -m pytest tests/performance/ -o addopts="" -v --junitxml=perf-junit.xml - name: Upload performance results if: always()