-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST: split up pandas/tests/test_resample.py #23872
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: split up pandas/tests/test_resample.py #23872
Conversation
Hello @simonjayhawkins! Thanks for updating the PR.
|
Codecov Report
@@ Coverage Diff @@
## master #23872 +/- ##
=======================================
Coverage 92.29% 92.29%
=======================================
Files 161 161
Lines 51500 51500
=======================================
Hits 47533 47533
Misses 3967 3967
Continue to review full report at Codecov.
|
from pandas.errors import AbstractMethodError | ||
|
||
import pandas as pd | ||
from pandas import DataFrame, Series |
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.
btw make sure you isort these new files and you may need to remove test_resample from setup.cfg
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.
done
pandas/tests/resample/test_base.py
Outdated
resample_methods = downsample_methods + upsample_methods + series_methods | ||
|
||
|
||
def _simple_ts(start, end, freq='D'): |
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.
let's rename these to something more readable and add a doc-string
index = self.create_series().index[:0] | ||
f = DataFrame(index=index) | ||
|
||
for freq in ['M', 'D', 'H']: |
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.
in a future pass can parameterize things like this
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.
OK
@@ -0,0 +1,65 @@ | |||
# pylint: disable=E1101 | |||
|
|||
import numpy as np |
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.
you can just name test_timedelta.py
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.
done
@@ -0,0 +1,739 @@ | |||
# pylint: disable=E1101 | |||
|
|||
from datetime import datetime, timedelta |
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.
test_period is ok
i wouldn’t actually change the class structure / fixtures now |
OK, i'll just rename _simple_ts etc and leave it at that? i've changed the checklist from closes to precursor to |
yeah a change like this is hard enough - first pass is just reorg minimally and rename then can come back later and clean |
@jreback The three files with the classes changed so far were not inheriting from the base class so the changes were relatively small. should i leave these changes in or revert those three commits? |
thanks @simonjayhawkins nice split! sure happy to have a followup to address questions / simplify / use fixtures here |
git diff upstream/master -u -- "*.py" | flake8 --diff