-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
TST: refactored tests to use parametrize instead of "for" loop #41195
Conversation
ShaharNaveh
commented
Apr 28, 2021
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
pandas/tests/generic/test_series.py
Outdated
@@ -52,33 +52,42 @@ def test_nonzero_single_element(self): | |||
s = Series([False]) | |||
assert not s.bool() | |||
|
|||
@pytest.mark.parametrize( |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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:)
There was a problem hiding this comment.
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
thanks @ShaharNaveh |