Skip to content

REF: share BooleanArray tests with MaskedArray #54422

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 5 commits into from
Aug 5, 2023

Conversation

jbrockmendel
Copy link
Member

mirror the layout in the pyarrow tests.

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

lgtm, just a question

Comment on lines 1365 to 1369
c = b
na = np.nan
dfg = pd.array([b, b, na, na, a, a, b, c], dtype="boolean")

df = DataFrame({"A": [1, 1, 2, 2, 3, 3, 1], "B": dfg[:-1]})
Copy link
Member

Choose a reason for hiding this comment

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

nit: I see this was copied from a more generic test, should we clean up here? I.e. remove occurrences of c and dfg[:-1] -> dfg

Copy link
Member Author

Choose a reason for hiding this comment

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

good catch, updated

Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

lgtm

@mroeschke mroeschke added this to the 2.1 milestone Aug 5, 2023
@mroeschke mroeschke added Testing pandas testing functions or related to the test suite ExtensionArray Extending pandas with custom dtypes or arrays. labels Aug 5, 2023
@mroeschke mroeschke merged commit 71a6d53 into pandas-dev:main Aug 5, 2023
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the ref-tests-3 branch August 5, 2023 23:31
mroeschke pushed a commit to mroeschke/pandas that referenced this pull request Aug 18, 2023
* REF: share BooleanArray tests with other Masked cases

* REF: test_masked_numeric->test_masked

* remove unnecessary slicing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

3 participants