Skip to content

Expand DeepRhythm test suite #16

Merged
bleugreen merged 20 commits intomainfrom
agent/DPRT-5-builder-1
Feb 22, 2026
Merged

Expand DeepRhythm test suite #16
bleugreen merged 20 commits intomainfrom
agent/DPRT-5-builder-1

Conversation

@bleugreen
Copy link
Owner

Summary

Expands the test suite from 7 tests in a single file to 59 tests across 4 files organized into tiers by dependency weight.

Test Structure

File Tier Tests Dependencies
tests/test_utils.py 1 18 Pure unit tests — BPM conversion, split_audio, get_device, error classes
tests/test_audio_proc.py 2 19 Audio processing — bandfilter, onset strength, HCQM (CPU tensors, no model weights)
tests/test_model.py 1+3 8 Model architecture (no weights) + 2 slow predictor tests
tests/test_predictor.py 3+4 14 Integration & edge cases — prediction modes, click tracks, silence, boundary conditions

Key Features

  • @pytest.mark.slow marker for tests requiring model weights (16 tests)
  • Session-scoped predictor fixture — loads model once across all slow tests
  • Fast test path: pytest -m "not slow" runs 43 tests in ~2s with no network/weight download
  • Parametrized click track tests at 90/120/140 BPM with ±10% tolerance
  • Shared helpers in conftest.py: make_click_track, make_sine_wave, make_silence, write_wav

Changes

File Action
tests/conftest.py CREATE — fixtures, helpers, marker registration
tests/test_utils.py CREATE — Tier 1 pure unit tests
tests/test_audio_proc.py CREATE — Tier 2 audio processing tests
tests/test_model.py MODIFY — moved BPM/split tests to test_utils, added architecture tests, marked slow
tests/test_predictor.py CREATE — Tier 3+4 integration & edge cases
pyproject.toml MODIFY — added pytest slow marker config

Verification

59 passed, 6 warnings in 3.32s

All ruff checks pass on test files.

@bleugreen bleugreen changed the title Expand DeepRhythm test suite (Tiers 1-4) Expand DeepRhythm test suite Feb 22, 2026
@bleugreen bleugreen force-pushed the agent/DPRT-5-builder-1 branch from d939c94 to bf02dd6 Compare February 22, 2026 05:19
@bleugreen bleugreen force-pushed the agent/DPRT-5-builder-1 branch 4 times, most recently from d869c4a to 26a2fee Compare February 22, 2026 05:23
@bleugreen bleugreen force-pushed the agent/DPRT-5-builder-1 branch from 26a2fee to 2398d47 Compare February 22, 2026 05:24
@bleugreen bleugreen force-pushed the agent/DPRT-5-builder-1 branch from 7ced29b to 70baaa3 Compare February 22, 2026 05:28
@bleugreen bleugreen merged commit c354859 into main Feb 22, 2026
1 check passed
@bleugreen bleugreen deleted the agent/DPRT-5-builder-1 branch February 22, 2026 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant