Files
gps-denied-onboard/tests/e2e/test_mars_lvig.py
T
Yuzviak 5744ff65ac feat(02-03): apply module-level pytestmark to 37 test files
- Add pytestmark = [pytest.mark.<category>] to all 23 root test files and 14 e2e test files
- Marker distribution: 22 unit, 7 integration, 1 blackbox, 1 sitl, 5 e2e + 2 e2e integration
- Add import pytest to test_models.py, test_download.py, test_synthetic_adapter.py (were missing)
- Convert test_sitl_integration.py's bare pytestmark to list form preserving skipif guard
- Union of all 5 markers = 298/298 = 100% coverage; 216 tests pass with --strict-markers
2026-05-11 18:20:05 +03:00

38 lines
1.3 KiB
Python

"""MARS-LVIG stress tier — featureless sequences, completion-rate gate."""
from pathlib import Path
import pytest
pytestmark = [pytest.mark.e2e]
from gps_denied.testing.datasets.mars_lvig import MARSLVIGAdapter
from gps_denied.testing.harness import E2EHarness
# Stress tier does not gate on RMSE — featureless sequences legitimately cause
# tracking loss. The gate is whether the pipeline RUNS TO COMPLETION without
# crashing, and what fraction of frames produced any estimate at all.
MARS_COMPLETION_FLOOR = 0.0 # initial: any run-to-completion passes; tighten later
@pytest.mark.e2e
@pytest.mark.e2e_slow
@pytest.mark.needs_dataset
@pytest.mark.asyncio
async def test_mars_lvig_runs_to_completion(mars_lvig_root: Path):
# Pick the first available sequence under mars_lvig_root
seqs = sorted(p for p in mars_lvig_root.iterdir() if p.is_dir())
if not seqs:
pytest.skip(f"No MARS-LVIG sequences found under {mars_lvig_root}")
adapter = MARSLVIGAdapter(seqs[0])
harness = E2EHarness(adapter)
result = await harness.run()
assert result.num_frames_submitted > 0
completion_rate = (
result.num_estimates / result.num_frames_submitted
if result.num_frames_submitted else 0.0
)
assert completion_rate >= MARS_COMPLETION_FLOOR, (
f"Completion rate too low: {completion_rate:.2%}"
)