Skip to content

REGR: assert_series_equal defaulting to check_exact=True for Index #57341

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

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

phofl
Copy link
Member

@phofl phofl commented Feb 10, 2024

@phofl phofl added Testing pandas testing functions or related to the test suite Regression Functionality that used to work in a prior pandas version labels Feb 10, 2024
@phofl phofl added this to the 2.2.1 milestone Feb 10, 2024
@mroeschke mroeschke merged commit 2f88309 into pandas-dev:main Feb 12, 2024
@mroeschke
Copy link
Member

Thanks @phofl

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Feb 12, 2024
@phofl phofl deleted the 57067 branch February 12, 2024 18:24
mroeschke pushed a commit that referenced this pull request Feb 12, 2024
…ing to check_exact=True for Index) (#57380)

Backport PR #57341: REGR: assert_series_equal defaulting to check_exact=True for Index

Co-authored-by: Patrick Hoefler <[email protected]>
@@ -902,6 +902,7 @@ def assert_series_equal(
>>> tm.assert_series_equal(a, b)
"""
__tracebackhide__ = True
check_exact_index = False if check_exact is lib.no_default else check_exact
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't we want to default to check_exact=True for integers and false for floats?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't a fan of doing the breaking change in a minor release, that's why I reverted back to 2.1.x behaviour for Index. We can introduce the more intelligent behavior for 3.0 if someone wants to do it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #57386 to track.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Regression Functionality that used to work in a prior pandas version Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: testing.assert_series_equal: inferred check_exact should not be passed down to index check
3 participants