-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DEPR: be stricter in assert_almost_equal #52081
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
DEPR: be stricter in assert_almost_equal #52081
Conversation
elif checknull(b): | ||
# GH#18463 | ||
warnings.warn( | ||
f"Mismatched null-like values {a} and {b} found. In a future " |
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.
Do we need a whatsnew entry for this change since the testing functions are public?
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.
Good idea, will update
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.
updated+green
Thanks @jbrockmendel |
* DEPR: be stricter in assert_almost_equal * 32bit builds * Fix transform test * ignore warning i cant reproduce localy * pylint fixup * Fix AarrayManager and CoW builds * fix tests * Whatsnew --------- Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
* DEPR: be stricter in assert_almost_equal * 32bit builds * Fix transform test * ignore warning i cant reproduce localy * pylint fixup * Fix AarrayManager and CoW builds * fix tests * Whatsnew --------- Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
This turns out to be a bit annoying while updating pyarrow tests for certain cases. For example, we have tests where we check that in the input you can have mixed NA-likes values. To assert the result, with this PR we need to construct the expected data with a consistent NA value. For small data it's typically straightforward to redefine it correctly. For larger data, that's a bit more annoying though. One thing that also doesn't help is that we don't allow filling NAs with Should we also consider adding a keyword for relaxing this, so you can override the strict default for cases you don't care about the difference? (which was also suggested in #18463) |
* DEPR: be stricter in assert_almost_equal * 32bit builds * Fix transform test * ignore warning i cant reproduce localy * pylint fixup * Fix AarrayManager and CoW builds * fix tests * Whatsnew --------- Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
Any chance of getting a flag in Or maybe it could be connected to |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.xref #18463 this doesn't get us all the way there since assert_index_equal and assert_numpy_array_equal go through different paths.
Note the many tests that needed to be changed; some of these likely represent undesired behaviors.
@phofl i found a usecase for downcast=False in fillna!