From 49ab8820b7931d3682dc2263f5f69fd032ca03bc Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 11 Jun 2024 09:16:26 -0400 Subject: [PATCH] loosen up hash_limit test hash_limit_string works by doing a modulus of a hash value so that the range of possible numbers is 0-N. however, there's a chance we might not populate every 0-N value in unusual cases on CI, even after iterating 500 times apparently. Loosen the change by making sure we got at least N/2 unique hash messages but not greater than N. Change-Id: I5cd2845697ec0a718ddca1c95fbc4867b06eabee (cherry picked from commit ef04a401100ff37915c281c412ed3d784565e429) --- test/base/test_warnings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/base/test_warnings.py b/test/base/test_warnings.py index ee286a7bc9..069835ff9e 100644 --- a/test/base/test_warnings.py +++ b/test/base/test_warnings.py @@ -36,7 +36,7 @@ class WarnDeprecatedLimitedTest(fixtures.TestBase): messages.add(message) eq_(len(printouts), occurrences) - eq_(len(messages), cap) + assert cap / 2 < len(messages) <= cap class ClsWarningTest(fixtures.TestBase): -- 2.47.2