From 2841914185b23ce0aff0a730bde52275e0b6524e Mon Sep 17 00:00:00 2001 From: Peter Sobot Date: Sat, 15 Jul 2023 16:59:58 -0400 Subject: [PATCH] Allow tests to take longer to account for slow runners. --- tests/test_resampled_io.py | 2 +- tests/test_thread_safety.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_resampled_io.py b/tests/test_resampled_io.py index e1717d9d..07547783 100644 --- a/tests/test_resampled_io.py +++ b/tests/test_resampled_io.py @@ -155,7 +155,7 @@ def test_seek_resampled_is_constant_time(sample_rate: float, target_sample_rate: f.seek(i) b = time.time() timings.append(b - a) - assert np.std(timings) < 0.01 + assert np.std(timings) < 0.02 @pytest.mark.parametrize("sample_rate", [8000, 11025, 22050, 44100, 48000]) diff --git a/tests/test_thread_safety.py b/tests/test_thread_safety.py index e27bae50..a5480ef7 100644 --- a/tests/test_thread_safety.py +++ b/tests/test_thread_safety.py @@ -51,7 +51,7 @@ def test_concurrent_processing_produces_identical_audio(plugin_class): futures.append(e.submit(plugin.process, noise, sample_rate=sr)) # This will throw an exception if we exceed the timeout: - processed = [future.result(timeout=2 * num_concurrent_plugins) for future in futures] + processed = [future.result(timeout=10 * num_concurrent_plugins) for future in futures] for result in processed: np.testing.assert_allclose(expected_output, result)