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

TST/REF: collect tests by method #37449

Merged
merged 8 commits into from
Oct 29, 2020

Conversation

jbrockmendel
Copy link
Member

No description provided.

@jreback jreback added the Testing pandas testing functions or related to the test suite label Oct 28, 2020
@jreback jreback added this to the 1.2 milestone Oct 28, 2020
class TestAsArray:
@pytest.mark.parametrize("tz", [None, "US/Central"])
def test_asarray_object_dt64(self, tz):
ser = Series(date_range("2000", periods=2, tz=tz))
Copy link
Contributor

Choose a reason for hiding this comment

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

hmm, these are not npfuncs, i think this would be better in a test_datetimes?

Copy link
Member Author

Choose a reason for hiding this comment

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

its for np.asarray

current plan is to get rid of tests.(series|frame).test_datetimes

Copy link
Contributor

Choose a reason for hiding this comment

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

i get it but these are pure conversion tests should be located with to_numpy() for example and it ufuncs themselves

Copy link
Member Author

Choose a reason for hiding this comment

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

there is already a dedicated test_ufuncs.py.

The idea behind the collect-by-method approach is for it to be really obvious where a test belongs. to_numpy gets tested in test_to_numpy, .values gets tested in test_values.

np.array is an odd duck because it isnt one of our methods, so this may not be the best long-term place for this (ive been looking at tests.base which has tests shared between Index/Series which this might fit into eventually). how about we revisit this in a few weeks when (hopefully) we're closer to the end of this process

Copy link
Contributor

Choose a reason for hiding this comment

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

hmm i would just move it now

Copy link
Member Author

Choose a reason for hiding this comment

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

updated to move these to tests.base.test_conversion

@jreback jreback merged commit d391e0b into pandas-dev:master Oct 29, 2020
@jbrockmendel jbrockmendel deleted the tst-timeseries-2 branch October 29, 2020 01:59
kesmit13 pushed a commit to kesmit13/pandas that referenced this pull request Nov 2, 2020
ukarroum pushed a commit to ukarroum/pandas that referenced this pull request Nov 2, 2020
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