Skip to content

CLN/TST: Remove Base Class and all subclasses and fixturize data #34179

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

Merged
merged 13 commits into from
May 15, 2020

Conversation

charlesdong1991
Copy link
Member

@charlesdong1991 charlesdong1991 commented May 14, 2020

This PR will be able to finally close 30486 in my opinion (even a little beyond the scope ^^), and after this, all classes adhered to Base in tests/window folder is removed.

Although the PR is huge, it actually is quite simple, basically it does:

  1. Turn needed data from _create_data() in Base class as fixtures
  2. Remove Base class
  3. Change the shared methods which need to inherit data from Base class to use arguments, and in the real tests, assign corresponding fixtures to those arguments accordingly.
  4. Remove all sub-classes which inherit from Base class, and now they all turn to independent test functions.

cc @jreback

And there is no test missing or added, so number of tests remain unchanged for all:
This is the result after i did a quick run for all changed tests to check the number of tests:

test_api: 15
test_ewm: 6
test_expanding: 21
test_rolling: 150
test_window: 23
test_moments_ewm: 22
test_moments_rolling: 253
test_moments_consitency_ewm: 4310
test_moments_consistenty_expanding: 1340
test_moments_consistency_rolling: 10881

@pep8speaks
Copy link

pep8speaks commented May 14, 2020

Hello @charlesdong1991! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-05-15 09:02:26 UTC

@jreback jreback added Testing pandas testing functions or related to the test suite Window rolling, ewma, expanding labels May 15, 2020
@jreback jreback added this to the 1.1 milestone May 15, 2020
@jreback jreback merged commit 268c462 into pandas-dev:master May 15, 2020
@jreback
Copy link
Contributor

jreback commented May 15, 2020

thanks @charlesdong1991 tremendous job!

@charlesdong1991 charlesdong1991 deleted the moment_test_5 branch May 19, 2020 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite Window rolling, ewma, expanding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

REF: window/test_moments.py
3 participants