vutran1710 / PyrateLimiter

⚔️Python Rate-Limiter using Leaky-Bucket Algorithm Family
https://pyratelimiter.readthedocs.io
MIT License
347 stars 36 forks source link

Allow for sleep to be called more times than expected #93

Closed musicinmybrain closed 1 year ago

musicinmybrain commented 1 year ago

While reviewing a python-rate-limiter package for Fedora Linux, I found that sleep may be called more times than expected in the tests. On Fedora Linux Rawhide on x86_64 with Python 3.11, it is called 3 times instead of 2.

Loosen the assertion so that this doesn’t fail test_sleep.

vutran1710 commented 1 year ago

seem this test is kinda flaky, isnt it? I need to think about the root cause first. I think patching like this is not gonna help in the long run

vutran1710 commented 1 year ago

@musicinmybrain Please see #99