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: refactored tests to use parametrize instead of "for" loop #41195

Merged

Conversation

ShaharNaveh
Copy link
Member

  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them

@@ -52,33 +52,42 @@ def test_nonzero_single_element(self):
s = Series([False])
assert not s.bool()

@pytest.mark.parametrize(
Copy link
Contributor

Choose a reason for hiding this comment

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

can you just put the Series iniside the test functions. (for all of these cases)

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure I understand, what does it means "inside" the test functions?
I would really appreciate if you can post of example code for what you ment:)

Copy link
Contributor

Choose a reason for hiding this comment

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

the parameters should be like [np.nan, pd.NatT] then simply construct what you need in the function

@jreback jreback added this to the 1.3 milestone Apr 28, 2021
@jreback jreback added the Testing pandas testing functions or related to the test suite label Apr 28, 2021
@jreback jreback merged commit e657c30 into pandas-dev:master May 3, 2021
@jreback
Copy link
Contributor

jreback commented May 3, 2021

thanks @ShaharNaveh

@ShaharNaveh ShaharNaveh deleted the TST-ref-tests-series-parametrize branch May 3, 2021 13:15
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