From b510882e7eab8c838e5b7bddb134b093327bf80c Mon Sep 17 00:00:00 2001 From: Dave Date: Sun, 15 Dec 2024 21:07:51 +0100 Subject: [PATCH] make rate limit tests less strict --- tests/extract/test_sources.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/extract/test_sources.py b/tests/extract/test_sources.py index a5ae4858fa..db9f7432a2 100644 --- a/tests/extract/test_sources.py +++ b/tests/extract/test_sources.py @@ -918,9 +918,9 @@ def rate_limited_resource(): if rate_limit is None: assert elapsed < 0.1 elif rate_limit == 10: - assert elapsed > 1.0 and elapsed < 2.0 + assert (elapsed > 1.0) and (elapsed < 3.0) elif rate_limit == 100: - assert elapsed > 0.1 and elapsed < 0.3 + assert (elapsed > 0.1) and (elapsed < 0.6) # run another check with a source and transformer # here we check that rate limit also works with multiple resources and on transformers @@ -940,9 +940,9 @@ def infinite_source(): if rate_limit is None: assert elapsed < 0.1 elif rate_limit == 10: - assert elapsed > 2.5 and elapsed < 4.0 + assert (elapsed > 2.5) and (elapsed < 5.0) elif rate_limit == 100: - assert elapsed > 0.2 and elapsed < 1.0 + assert (elapsed > 0.2) and (elapsed < 1.0) try: del os.environ["EXTRACT__RATE_LIMIT"]