-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
BUG: Respect check_dtype in assert_series_equal #32757
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
Conversation
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.
Thanks for looking into this!
Can you also add a test for the assert_frame_equal
case? (so to ensure it is properly passed through)
with pytest.raises(AssertionError, match=msg): | ||
tm.assert_series_equal(left, right, check_dtype=check_dtype) | ||
else: | ||
tm.assert_series_equal(left, right, check_dtype=check_dtype) |
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.
Can you just test both True / False cases inline here without the parametrization? (it actually gets you rid of the if/else, while for the rest not adding any code)
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.
(and same below)
can you add a whatsnew note (can put in bug fixes other section) |
IIUC the bug is only on master, not released. Is the whatsnew needed? |
Co-Authored-By: Joris Van den Bossche <[email protected]>
Part of the fix did fix something compared to 1.0 (eg for intervals) |
Thanks @dsaxton ! |
If this fixes something that worked in 1.0, then should this be backported? |
Sorry, I meant: it's partly fixing a bug that is in 1.0 (hence the whatsnew note is fine), and partly a regression that is only in master (which doesn't need a whatsnew). |
ah. my bad. |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
I'm not sure if https://github.com/pandas-dev/pandas/blob/master/pandas/_testing.py#L1174 needs to change too?
cc @jorisvandenbossche