-
Notifications
You must be signed in to change notification settings - Fork 908
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
Improve assert_eq
handling of scalar
#7220
Conversation
Codecov Report
@@ Coverage Diff @@
## branch-0.18 #7220 +/- ##
===============================================
+ Coverage 82.09% 82.20% +0.11%
===============================================
Files 97 100 +3
Lines 16474 16952 +478
===============================================
+ Hits 13524 13936 +412
- Misses 2950 3016 +66
Continue to review full report at Codecov.
|
rerun tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few typos otherwise LGTM
Co-authored-by: brandon-b-miller <[email protected]>
rerun tests |
@gpucibot merge |
rerun tests |
Closes #7199
Refactors scalar handling inside
assert_eq
. On higher level, this PR proposes a "whitelist" style testing: all compares should go to the "strict equal" code path unless explicitly allowed. This allows the test system to capture all unintended inequality except the ones that's discussed upon. For example, this PR creates two whitelist items:__eq__
, use it to determine equality.For all other cases, the operands should be strictly equal. Note that for testing purposes,
np.nan
are considered equal to itself.