-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: add test for rolling max with DatetimeIndex #29761
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: add test for rolling max with DatetimeIndex #29761
Conversation
96f5103
to
8f66410
Compare
8f66410
to
7852918
Compare
pandas/tests/window/test_moments.py
Outdated
@@ -1891,6 +1891,20 @@ def test_rolling_corr_with_zero_variance(self, window): | |||
|
|||
assert s.rolling(window=window).corr(other=other).isna().all() | |||
|
|||
def test_rolling_max_datetimeindex(self): |
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.
move to tests/window/test_timeseries_window.py and put near similar tests (this might be a duplicate)
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 the feedback, @jreback. Moved the test to tests/window/test_timeseries_window.py
. This test is different by being the only one using minutes as frequency in the file. Other minor differences is that it's using Series as opposed to DataFrame and explicit definition of expected.
Having said that, I agree that there are very similar tests and I'm happy to remove it all together.
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.
@ganevgv if you would like to clean that up and parametrize frequencies / containers that would be very welcome
thanks @ganevgv I would love if you could parametrize some of these tests (e.g. also test min) in a followup if you can. |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff