Skip to content

TST: make get_upcast_box more flexible #44385

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
Nov 11, 2021

Conversation

jbrockmendel
Copy link
Member

Will make it easier to parametrize these tests

@jreback
Copy link
Contributor

jreback commented Nov 10, 2021

ok can we disable the sdist 3.10 test :->

@jbrockmendel
Copy link
Member Author

ok can we disable the sdist 3.10 test :->

sure but separate PR

@@ -259,7 +259,7 @@ def box_expected(expected, box_cls, transpose=True):
expected = DatetimeArray(expected)
elif box_cls is TimedeltaArray:
expected = TimedeltaArray(expected)
elif box_cls is np.ndarray:
elif box_cls is np.ndarray or box_cls is np.array:
Copy link
Contributor

Choose a reason for hiding this comment

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

umm this is very strange

Copy link
Member Author

Choose a reason for hiding this comment

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

we're a bit inconsistent about when we use the class vs the constructor; np.ndarray(foo) doesn't work like np.array(foo)

Copy link
Contributor

Choose a reason for hiding this comment

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

ok sure, but should ideally fix this at some point.

@jreback jreback added the Testing pandas testing functions or related to the test suite label Nov 11, 2021
@jreback jreback added this to the 1.4 milestone Nov 11, 2021
@jreback jreback merged commit d38b18c into pandas-dev:master Nov 11, 2021
@jbrockmendel jbrockmendel deleted the ref-get_expected_box branch November 11, 2021 00:41
nickleus27 pushed a commit to nickleus27/pandas that referenced this pull request Nov 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants