Skip to content

Commit 7b49c8c

Browse files
Copilotshauneccles
andcommitted
Fix test to use specific ValueError exception type
Co-authored-by: shauneccles <21007065+shauneccles@users.noreply.github.com>
1 parent 3f0df5f commit 7b49c8c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_threading_performance.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,8 +423,8 @@ def test_release_gil_parameter_invalid():
423423
"""Test that invalid release_gil values raise appropriate errors."""
424424
data = np.random.randn(100).astype(np.float32)
425425

426-
# Invalid string value should raise an error
427-
with pytest.raises(Exception):
426+
# Invalid string value should raise a ValueError
427+
with pytest.raises(ValueError, match="Invalid release_gil"):
428428
samplerate.resample(data, 2.0, "sinc_fastest", verbose=False, release_gil="invalid")
429429

430430
print("\n Invalid release_gil parameter test passed!")

0 commit comments

Comments
 (0)