Skip to content

πŸŽ› πŸ”Š A Python library for audio.

Fix flaky MP3 estimation test.

Peter Sobotd1c7e0f47c4b
diff --git a/tests/test_io.py b/tests/test_io.py
index f9ace54..9277762 100644
--- a/tests/test_io.py
+++ b/tests/test_io.py
@@ -1038,11 +1038,11 @@ def test_mp3_duration_estimate(samplerate: float, target_samplerate: float, chun
audio = f.read(f.frames)
assert f.exact_duration_known
assert f.frames >= num_frames
- assert f.frames < original_frame_estimate
+ assert f.frames <= original_frame_estimate
assert audio.shape[0] == f.num_channels
assert audio.shape[1] == f.frames
assert audio.shape[1] >= num_frames
- assert audio.shape[1] < original_frame_estimate
+ assert audio.shape[1] <= original_frame_estimate
# Seek back to the start
f.seek(0)