-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
CLN: Parameterize test case #22327
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
CLN: Parameterize test case #22327
Conversation
]) | ||
def test_round_day_naive(self, timestamp_input, round_freq, date): | ||
dt = Timestamp(timestamp_input) | ||
result = dt.round(round_freq) |
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.
By nature of this test I suppose we don't really need round_freq
as a parameter and can instead just hard code it here (unless you are being forward-looking and trying to integrate other frequencies)
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.
thanks for taking a look @WillAyd , turns out there was another similar test function in the same file so I combined them. What do you think?
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.
Nice! Just one more minor nit looks like your test is called test_test_round_frequencies
- can just change to test_round_frequencies
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.
Ahh my bad.. thanks have done!
Codecov Report
@@ Coverage Diff @@
## master #22327 +/- ##
=======================================
Coverage 92.08% 92.08%
=======================================
Files 169 169
Lines 50706 50706
=======================================
Hits 46691 46691
Misses 4015 4015
Continue to review full report at Codecov.
|
dt = Timestamp('20130104 12:00:00') | ||
result = dt.round('D') | ||
expected = Timestamp('20130105') | ||
@pytest.mark.parametrize('timestamp_input, round_freq, date', [ |
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.
just call this timestamp, freq, expected
for the args, otherwise lgtm.
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.
thanks @jreback updated
lgtm. ping on green. |
thanks @alimcmaster1 |
git diff upstream/master -u -- "*.py" | flake8 --diff