Skip to content

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

Fix exception propagation test.

Peter Sobot656719bca2fd
diff --git a/tests/test_io.py b/tests/test_io.py
index a0bd3ad..4a422e6 100644
--- a/tests/test_io.py
+++ b/tests/test_io.py
@@ -349,7 +349,8 @@ def test_file_like_exceptions_propagate():
assert af.read(1).nbytes > 0
should_throw[0] = True
with pytest.raises(ValueError) as e:
- af.read(100)
+ for _ in range(af.frames - 1):
+ af.read(1)
assert "Some kinda error!" in str(e)