test: everything the tests read is in git -- a fresh checkout passes on its own

A fresh checkout of dev failed 10 tests, errored 3 and skipped 64: the
tests read 100 files that were only on the dev box.  Recorded with an
audit hook over a full run: 100 files, 2.3 MB, out of 1.1 GB of
bridges/captures/ and 45 MB of histogram-extension-re/.

- Force-added in place: tests/fixtures/thor-idf (14), histogram-multi-
  interval (2) and the one histogram-extension-re file read.
- Copied into tests/fixtures/example-events/ (10) and
  tests/fixtures/captures/ (73, from bridges/captures/), and the tests
  pointed there.
- The presence skips ('not on this machine', 'gitignored', 'fixture
  missing') are gone: a missing fixture now fails instead of skipping.

The worktree now runs as the dev box does: 1,787 passed, 0 failed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
This commit is contained in:
serversdownandClaude Opus 5.5 committed 2026-11-19 13:32:59 -05:00
1 parent c2b8e76774
commit 4d0984dcaf
109 files changed
+23763 -77

No files matched your search

+1 -21
View File
@@ -32,7 +32,7 @@ from minimateplus.histogram_codec import (
from minimateplus.waveform_codec import mic_count_to_db
_FIXTURE_DIR = Path(__file__).resolve().parent.parent / "example-events" / "histogram"
_FIXTURE_DIR = Path(__file__).resolve().parent / "fixtures" / "example-events" / "histogram"
def _extract_body(path: Path) -> bytes:
@@ -104,8 +104,6 @@ def _parse_txt_rows(path: Path) -> list[tuple[str, list]]:
def test_walk_body_returns_records(fixture: str):
"""Walker yields at least one valid block per fixture."""
path = _FIXTURE_DIR / fixture
if not path.exists():
pytest.skip(f"fixture missing: {path}")
records = walk_body(_extract_body(path))
assert len(records) > 100, f"expected hundreds of blocks, got {len(records)}"
@@ -116,8 +114,6 @@ def test_walk_body_record_count_matches_txt_intervals():
recording stop)."""
bin_path = _FIXTURE_DIR / "N844L20G.630H"
txt_path = _FIXTURE_DIR / "N844L20G_630H_ASCII.TXT"
if not bin_path.exists() or not txt_path.exists():
pytest.skip("fixture missing")
records = walk_body(_extract_body(bin_path))
txt_rows = _parse_txt_rows(txt_path)
# Allow off-by-one (final block may have been mid-write at stop)
@@ -130,8 +126,6 @@ def test_walk_body_segment_id_increments_every_256_blocks():
"""Segment ID advances 0→1→2→… after every 256 blocks within
one event."""
path = _FIXTURE_DIR / "N844L20G.630H"
if not path.exists():
pytest.skip("fixture missing")
records = walk_body(_extract_body(path))
# Group by segment_id and verify counts make sense
from collections import Counter
@@ -158,8 +152,6 @@ def test_decoded_geo_peaks_match_txt(fixture: str):
matches the corresponding .TXT cell."""
bin_path = _FIXTURE_DIR / fixture
txt_path = _FIXTURE_DIR / (fixture.replace(".", "_") + "_ASCII.TXT")
if not bin_path.exists() or not txt_path.exists():
pytest.skip("fixture missing")
records = walk_body(_extract_body(bin_path))
txt_rows = _parse_txt_rows(txt_path)
n = min(len(records), len(txt_rows))
@@ -187,8 +179,6 @@ def test_decoded_geo_freqs_match_txt(fixture: str):
where the freq is in-range (not the `>100 Hz` sentinel)."""
bin_path = _FIXTURE_DIR / fixture
txt_path = _FIXTURE_DIR / (fixture.replace(".", "_") + "_ASCII.TXT")
if not bin_path.exists() or not txt_path.exists():
pytest.skip("fixture missing")
records = walk_body(_extract_body(bin_path))
txt_rows = _parse_txt_rows(txt_path)
n = min(len(records), len(txt_rows))
@@ -223,8 +213,6 @@ def test_decoded_mic_db_matches_txt(fixture: str):
the .TXT dB(L) column."""
bin_path = _FIXTURE_DIR / fixture
txt_path = _FIXTURE_DIR / (fixture.replace(".", "_") + "_ASCII.TXT")
if not bin_path.exists() or not txt_path.exists():
pytest.skip("fixture missing")
records = walk_body(_extract_body(bin_path))
txt_rows = _parse_txt_rows(txt_path)
n = min(len(records), len(txt_rows))
@@ -252,8 +240,6 @@ def test_decoded_mic_freq_matches_txt(fixture: str):
"""Decoded MicL half-period → freq matches the .TXT col 9 freq."""
bin_path = _FIXTURE_DIR / fixture
txt_path = _FIXTURE_DIR / (fixture.replace(".", "_") + "_ASCII.TXT")
if not bin_path.exists() or not txt_path.exists():
pytest.skip("fixture missing")
records = walk_body(_extract_body(bin_path))
txt_rows = _parse_txt_rows(txt_path)
n = min(len(records), len(txt_rows))
@@ -278,8 +264,6 @@ def test_decoded_mic_freq_matches_txt(fixture: str):
def test_decode_histogram_body_returns_four_channels():
"""The public API returns the standard 4-channel dict shape."""
path = _FIXTURE_DIR / "N844L20G.630H"
if not path.exists():
pytest.skip("fixture missing")
decoded = decode_histogram_body(_extract_body(path))
assert decoded is not None
assert set(decoded.keys()) == {"Tran", "Vert", "Long", "MicL"}
@@ -305,8 +289,6 @@ def test_decode_histogram_body_full_preserves_frequency_data():
"""The structured-record API preserves the per-channel half-period
fields that the flat-channel API drops."""
path = _FIXTURE_DIR / "N844L20G.630H"
if not path.exists():
pytest.skip("fixture missing")
records = decode_histogram_body_full(_extract_body(path))
assert records is not None
r0 = records[0]
@@ -609,8 +591,6 @@ _MULTI_FIXTURE = os.path.join(
)
@pytest.mark.skipif(not os.path.exists(_MULTI_FIXTURE),
reason="multi-interval fixture not present")
def test_multi_interval_matches_blastware_ascii_exactly():
"""BE9440/K440L3AQ.T70H — 5,710 intervals at 15 s, 4 per 92-byte block.