refactor: cap waveform decode length + guard frombuffer + tighten test

This commit is contained in:
2026-07-02 15:00:34 +02:00
parent 12eaa944a7
commit 7501c4729b
3 changed files with 11 additions and 2 deletions
+2
View File
@@ -551,6 +551,8 @@ def test_peaks_downsamples_to_bucket_count():
p = peaks(samples, buckets=64)
assert len(p) == 64
assert all(0.0 <= v <= 1.0 for v in p)
import pytest
assert max(p) == pytest.approx(1.0)
def test_peaks_empty_returns_zeros():