fix(ci): perf tests — use `python -m pytest` so `src` import resolves (#914)
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).
This commit is contained in:
parent
55f6a74e1e
commit
f8f08076eb
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in New Issue