-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
late eval of the skip condition #2248
Conversation
at module import time, the REDIS_INFO dict hasn't been initialized.
Codecov Report
@@ Coverage Diff @@
## master #2248 +/- ##
=======================================
Coverage 91.85% 91.86%
=======================================
Files 108 108
Lines 27776 27787 +11
=======================================
+ Hits 25515 25527 +12
+ Misses 2261 2260 -1
Continue to review full report at Codecov.
|
Unit-tests sporatically staling or failing is a big problem in this repo. This PR aims to fix that.... We have a stalled unittest somewhere, unfortunately, the logs are not quite up to identifying it...
|
You can't test rounded values for equalness, since they may fall each on a different side of 0.5. It is better to test their absolute difference for a certain tolerance, in this case 1.0 which is the intent of the original round.
3d9997e
to
4e7a3a9
Compare
so, yeah, spurious unit tests fail :) |
@kristjanvalur Thank you for the fix! |
Uh-oh! I just noticed a problem in the pr. Please see #2253 for a follow-up fix |
at module import time, the REDIS_INFO dict hasn't been initialized.
Pull Request check-list
Please make sure to review and check all of these items:
$ tox
pass with this change (including linting)?NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.
Description of change
when running the unittests manually, e.g. with
pytest tests
from the command line, test discovery would fail because theREDIS_INFO
dict, although existing, hadn't been initialized at import time. The skip tests need to evaluate the REDIS_INFO as initialized during session setup, hence the need for a late init (done via skip string)Additionally, changed two instances of
to
The former will fail, if for example,
time1==1000.4999
andtime2==1000.5001
which is clearly not what is intended.