Skip to content

TST/MAINT: split up test_resample.py to make it more understandable #17806

Closed
@winklerand

Description

@winklerand

As discussed in #16153 (comment), test_resample.py grew sufficiently large (currently ~ 2.7 k sloc), so splitting it up should make it more understandable.

Proposal to split along the existing classes:

tests/resample (sub-dir)
|- common.py
|- test_resample_api.py
|- base.py
|- test_datetime.py
|- test_period.py
|- test_timedelta.py
|- test_resample_grouper.py
|- test_time_grouper.py

Moreover, readability of some test cases could be improved by using pytest features:

  • Convert nested for loops and "quasi-parametrized" tests (multiple test methods calling the same test logic with different parameters) to make use of @pytest.mark.parametrize decorator
  • Use pytest fixtures where appropriate

Metadata

Metadata

Assignees

No one assigned

    Labels

    CleanResampleresample methodTestingpandas testing functions or related to the test suite

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions