-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TST/REF: Parametrize consistency data and de-private methods #33875
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
Conversation
can you confirm number of tests before == number of tests after (adjusting for the fact that you may have parmaterized / added tests) ? can you show a before run so we have an idea here (pass -v to show the tests), might be pretty long. you can also to some extent see where we have tests taking a lot of time (because they are doing many things). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
yep, I have roughly verified that the number of tests remains unchanged! Regarding The same applies to For
I also mark i paste the tests before the change here in case you want to verify too!
expanding:
rolling:
|
the above looks quite lengthy, please let me know for further questions! @jreback |
build failure seems unrelated. @jreback |
/azp run |
Commenter does not have sufficient privileges for PR 33875 in repo pandas-dev/pandas |
thanks @charlesdong1991 very nice. the failure is one we have been seeing occasionally lately but its not consistent. keep em coming on this! |
xref #30486
I am sorry that this PR looks huge again. @jreback
But this seems a bit unavoidable, and please allow me to briefly explain this, and it is quite simple actually:
_create_consistency_data
method toconftest.py
and fixturize it asconsistency_data
.consistency_data
as fixture, and parametrize it to replace the inner loops.self.data = _create_consistency_data()
as part init inConsistencyBase
, so I remove it, also a bunch of tests can be moved out of the BIG ConsistencyBase class (which I think is the ultimate goal: avoid using big classes, but simply the functions).test_moments_rolling
,test_moments_ewm
, andtest_moment_expanding
out of their classes to be independent test functionsAfter this PR, we could start reducing the reliance on the giant Base/ConsistencyBase classes, and next step will be fixturize other data and then reduce more reliance on those classes and make tests look smaller.