mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-06-22 12:21:14 +00:00
[autodev] fix csv_reporter --csv collision with pytest-csv
Subprocess-spawned tests in e2e/_unit_tests/reporting/ crashed with "argparse.ArgumentError: argument --csv: conflicting option string: --csv" because pytest-csv (autoloaded via entry-point) and our custom plugin both register --csv. pytest's option registry does not allow overrides. Fix: drop pytest-csv from e2e/runner/requirements.txt. It was unused, dead weight, and incompatible with pytest 9.x (uses removed hookwrapper marker). Update conftest + csv_reporter comments to match. After fix: 1229/1229 in e2e/_unit_tests pass. Bug ticket creation deferred (user skipped interactive Q this session) — payload recorded in _docs/_process_leftovers/2026-05-17_csv_reporter_*.md for replay on next /autodev. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -206,8 +206,10 @@ def mock_suite_sat_url() -> str:
|
||||
|
||||
# The CSV reporter plugin is a separate module so the unit tests can exercise
|
||||
# it directly without going through a real pytest run. It is registered via
|
||||
# `pytest_plugins` so docker-compose's `--csv=...` flag binds to our column
|
||||
# set rather than the upstream pytest-csv default.
|
||||
# `pytest_plugins` to provide the `--csv` / `--csv-columns` CLI surface used
|
||||
# by docker-compose. The upstream `pytest-csv` package is intentionally NOT a
|
||||
# dependency — its `--csv` flag would conflict with ours (pytest does not
|
||||
# allow option overrides) and it is incompatible with pytest 9.x.
|
||||
pytest_plugins = [
|
||||
"runner.reporting.csv_reporter",
|
||||
"runner.reporting.evidence_bundler",
|
||||
|
||||
@@ -6,12 +6,14 @@ Emits one row per test with the exact columns declared in
|
||||
test_id, test_name, traces_to, fc_adapter, vio_strategy, tier,
|
||||
started_at_utc, execution_time_ms, result, error_message, evidence_paths
|
||||
|
||||
Why a custom plugin rather than `pytest-csv` defaults?
|
||||
- `pytest-csv` is dependency-installed for its column-extension hooks, but
|
||||
its default emission is `name`/`status`/`duration` — our matrix needs the
|
||||
`traces_to`, `fc_adapter`, `vio_strategy`, `tier`, `started_at_utc`,
|
||||
`evidence_paths` columns to feed the downstream badge generator and
|
||||
regression detector.
|
||||
Why a custom plugin rather than `pytest-csv`?
|
||||
- `pytest-csv`'s default emission is `name`/`status`/`duration`; our matrix
|
||||
needs the `traces_to`, `fc_adapter`, `vio_strategy`, `tier`,
|
||||
`started_at_utc`, `evidence_paths` columns to feed the downstream badge
|
||||
generator and regression detector.
|
||||
- pytest's option registry does not allow override of an already-registered
|
||||
flag, so this plugin owns `--csv` exclusively — `pytest-csv` is NOT a
|
||||
dependency (and is incompatible with pytest 9.x anyway).
|
||||
|
||||
Result classification per AC-9:
|
||||
- PASS / FAIL / SKIP map 1:1 to pytest's own outcome.
|
||||
|
||||
@@ -5,13 +5,17 @@
|
||||
# depend on gtsam — the numpy<2 ABI block that forces the SUT pin does not
|
||||
# apply here; see _docs/_process_leftovers/2026-05-11_d_cross_cve_1_opencv_pin_deferred.md).
|
||||
# - Versions match the SUT pyproject where feasible (numpy 1.x line, pyproj 3.6+, pydantic 2.x).
|
||||
# - pytest 8.x is the stable line; pytest-csv 3.x supplies the columns the CSV reporter plugin extends.
|
||||
# - pytest 8.x is the stable line. We do NOT depend on pytest-csv: an earlier
|
||||
# design considered extending its column hooks, but our custom
|
||||
# `runner.reporting.csv_reporter` plugin owns the `--csv` / `--csv-columns`
|
||||
# CLI surface end-to-end and pytest-csv 3.x conflicts on the flag name and
|
||||
# is also incompatible with pytest 9.x (uses the removed `hookwrapper`
|
||||
# marker). Keep it out of the image.
|
||||
|
||||
pytest>=8.0,<9.0
|
||||
pytest-timeout>=2.2,<3.0
|
||||
pytest-xdist>=3.5,<4.0
|
||||
pytest-forked>=1.6,<2.0
|
||||
pytest-csv>=3.0,<4.0
|
||||
|
||||
# MAVLink ground side — used for both AP signing-handshake assertions and the
|
||||
# passive listener that consumes mavproxy-listener's forwarded UDP stream.
|
||||
|
||||
Reference in New Issue
Block a user