From 8c6cad681ce2cced1da1d19ff7a8c5330ad50892 Mon Sep 17 00:00:00 2001 From: serversdown Date: Wed, 11 Nov 2026 14:54:16 -0500 Subject: [PATCH] test: the suite runs green -- fix the 16 long-standing 'known failures' They were two stale tests, not broken code: - tests/test_bw_ascii_report.py (15) read its Blastware ASCII reports from decode-re/5-8-26/ at the repo root, removed when the fixtures moved to tests/fixtures/decode-re-5-8-26/. At the real path all 27 of its tests pass. The same stale path made a report-pairing test in test_event_file_io.py skip silently; it now runs and passes. - test_save_imported_bw_without_report_works_unchanged (1) expected a sample-less event's PPV to be 0.0. Since fa9d3cd (2026-05-20) the decoder deliberately leaves peaks unknown (None) so a backfill never writes zeros over real peaks; the sidecar-level check now says so. Its main assertion -- no bw_report block without a report -- is unchanged and covered nowhere else. Full suite: 1,620 passed, 0 failed. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9 --- tests/test_bw_ascii_report.py | 2 +- tests/test_event_file_io.py | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/test_bw_ascii_report.py b/tests/test_bw_ascii_report.py index 5756fb2..3c4b467 100644 --- a/tests/test_bw_ascii_report.py +++ b/tests/test_bw_ascii_report.py @@ -23,7 +23,7 @@ from minimateplus.bw_ascii_report import ( ) -FIXTURES = Path(__file__).parent.parent / "decode-re" / "5-8-26" +FIXTURES = Path(__file__).parent / "fixtures" / "decode-re-5-8-26" def _fixture(event_name: str) -> Path: diff --git a/tests/test_event_file_io.py b/tests/test_event_file_io.py index 9135747..d3074cb 100644 --- a/tests/test_event_file_io.py +++ b/tests/test_event_file_io.py @@ -410,8 +410,8 @@ def test_save_imported_bw_with_paired_report(tmp_path: Path): # Use one of the real BW ASCII exports as the paired report. report_path = ( - Path(__file__).parent.parent - / "decode-re" / "5-8-26" / "event-c" / "M529LK44.AB0.TXT" + Path(__file__).parent + / "fixtures" / "decode-re-5-8-26" / "event-c" / "M529LK44.AB0.TXT" ) if not report_path.exists(): import pytest as _pt @@ -498,8 +498,9 @@ def test_save_imported_bw_without_report_works_unchanged(tmp_path: Path): sc = store.load_sidecar("BE11529", fname) assert sc is not None assert "bw_report" not in sc # block is absent without a report - # Synthetic event has zero samples → peaks all zero (was true before this change) - assert sc["peak_values"]["transverse"] == 0.0 + # Synthetic event has zero samples: the peaks stay unknown (None), never a + # fabricated 0.0 that a backfill could write over real peaks (fa9d3cd). + assert sc["peak_values"]["transverse"] is None def test_save_imported_bw_round_trip(tmp_path: Path):