mirror of
https://github.com/azaion/gps-denied-onboard.git
synced 2026-06-22 16:01:14 +00:00
[AZ-595] Batch 75: sitl_observer FDR-replay + scenario probe cleanup
Implement all 11 `sitl_observer` public surfaces as an offline
FDR-replay strategy (reads JSON fixtures under `${E2E_SITL_REPLAY_DIR}`
instead of live pymavlink/yamspy). Replace 12 per-scenario
`_harness_helpers_implemented` probes with one shared session-scoped
`sitl_replay_ready` fixture in `e2e/tests/conftest.py`.
Net: -636 LoC of duplicated scenario gating, +17 LoC shared fixture,
+38 new unit tests (596 total, up from 558). Includes K=3 cumulative
review for batches 73-75 (PASS).
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -40,3 +40,20 @@ _bootstrap_runner_path()
|
||||
# regardless of which conftest it discovers first. Star imports here are
|
||||
# the documented pytest pattern for conftest layering.
|
||||
from runner.conftest import * # noqa: F401,F403,E402 — pytest conftest re-export
|
||||
|
||||
import pytest # noqa: E402
|
||||
|
||||
from runner.helpers import sitl_observer # noqa: E402
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
def sitl_replay_ready() -> bool:
|
||||
"""True iff the FDR-replay fixture directory is configured + present.
|
||||
|
||||
AZ-595 replaces the per-scenario `_harness_helpers_implemented` probes
|
||||
that passed `/tmp/non-existent` to each helper and inspected the
|
||||
exception type. Scenarios should now consult this fixture and skip
|
||||
cleanly when the SITL replay fixtures haven't been prepared (the
|
||||
typical case during local unit runs that only exercise the helpers).
|
||||
"""
|
||||
return sitl_observer.replay_dir_available()
|
||||
|
||||
Reference in New Issue
Block a user