refactor: cap waveform decode length + guard frombuffer + tighten test
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user