Skip to content
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

Pass check_dtype to assert_extension_array_equal #35750

Merged
merged 8 commits into from Aug 17, 2020
Merged

Pass check_dtype to assert_extension_array_equal #35750

merged 8 commits into from Aug 17, 2020

Conversation

dsaxton
Copy link
Member

@dsaxton dsaxton commented Aug 16, 2020

@pep8speaks
Copy link

pep8speaks commented Aug 16, 2020

Hello @dsaxton! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-08-17 17:22:43 UTC

@simonjayhawkins simonjayhawkins added Bug ExtensionArray Extending pandas with custom dtypes or arrays. Testing pandas testing functions or related to the test suite labels Aug 16, 2020
@simonjayhawkins simonjayhawkins added this to the 1.1.1 milestone Aug 16, 2020
@simonjayhawkins
Copy link
Member

i've milestoned this 1.1.1. It does not appear to be a regression but no harm in backporting this. can put in bugfix section of whatsnew

left._values, right._values, index_values=np.asarray(left.index)
left._values,
right._values,
check_dtype=check_dtype,
Copy link
Member Author

Choose a reason for hiding this comment

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

Included this also as it seems it can't be wrong to pass check_dtype here, but not certain of how best to test (if at all)

@@ -296,3 +296,10 @@ def test_series_equal_exact_for_nonnumeric():
tm.assert_series_equal(s1, s3, check_exact=True)
with pytest.raises(AssertionError):
tm.assert_series_equal(s3, s1, check_exact=True)


def test_assert_series_equal_ignore_extension_dtype_mismatch():
Copy link
Contributor

Choose a reason for hiding this comment

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

same as above

@jreback jreback merged commit 9b54f9d into pandas-dev:master Aug 17, 2020
@jreback
Copy link
Contributor

jreback commented Aug 17, 2020

thanks @dsaxton very nice

@dsaxton dsaxton deleted the check-extension-dtype branch August 17, 2020 18:24
@simonjayhawkins
Copy link
Member

@meeseeksdev backport 1.1.x

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Aug 17, 2020
simonjayhawkins pushed a commit that referenced this pull request Aug 17, 2020
…35773)

Co-authored-by: Daniel Saxton <2658661+dsaxton@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug ExtensionArray Extending pandas with custom dtypes or arrays. Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attribute "dtype" are different error with testing.assert_frame_equal
4 participants