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

Remove TestData from series-tests test_api.py #29153

Conversation

SaturnFromTitan
Copy link
Contributor

Part of #22550

  • Replaced TestData usage in pandas/tests/series/test_api.py with fixtures
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff

* Replaced TestData usage in pandas/tests/series/test_api.py with
  fixtures
@jreback jreback added the Testing pandas testing functions or related to the test suite label Oct 22, 2019
@jreback jreback added this to the 1.0 milestone Oct 22, 2019
Copy link
Member

@simonjayhawkins simonjayhawkins left a comment

Choose a reason for hiding this comment

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

@SaturnFromTitan thanks for the PR.

can you split the tests where the two fixtures are tested independently

pandas/tests/series/test_api.py Outdated Show resolved Hide resolved
pandas/tests/series/test_api.py Outdated Show resolved Hide resolved
pandas/tests/series/test_api.py Outdated Show resolved Hide resolved
@SaturnFromTitan SaturnFromTitan force-pushed the remove-testdata-in-series-tests_test_api branch from 509e116 to b85a985 Compare October 22, 2019 13:56

# assert is lazy (genrators don't define reverse, lists do)
assert not hasattr(self.series.items(), "reverse")
assert not hasattr(string_series.items(), "reverse")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't get why this is part of the test, but I left it as it was there before. Currently, it's only part of the string_series tests for .items and .iteritems, but not for the datetime_series ones (same as it was before).

@simonjayhawkins What's your take on removing it vs leaving as is?

Copy link
Member

Choose a reason for hiding this comment

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

I think fine to leave as is.

@WillAyd WillAyd merged commit a8e510b into pandas-dev:master Oct 22, 2019
@WillAyd
Copy link
Member

WillAyd commented Oct 22, 2019

Thanks @SaturnFromTitan very nice cleanup

HawkinsBA pushed a commit to HawkinsBA/pandas that referenced this pull request Oct 29, 2019
Reksbril pushed a commit to Reksbril/pandas that referenced this pull request Nov 18, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
bongolegend pushed a commit to bongolegend/pandas that referenced this pull request Jan 1, 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.

4 participants