Skip to content

Conversation

@jbrockmendel
Copy link
Member

This began as part of #18489 and quickly became huge and tedious. Merits separating out and getting out of the way.

  • Move Year, Quarter, and Month offset test cases to a dedicated file

  • Implement pytest.mark.parametrize in very-nearly all the remaining places.

@jreback jreback added Frequency DateOffsets Testing pandas testing functions or related to the test suite labels Nov 26, 2017
@jreback
Copy link
Contributor

jreback commented Nov 26, 2017

might be worthwhile moving Week, LastWeekOfMonth, SemiMonth to separate test file
and FY253 to a separate file as well.

@jbrockmendel
Copy link
Member Author

might be worthwhile moving Week, LastWeekOfMonth, SemiMonth to separate test file
and FY253 to a separate file as well.

Very much on board. I'll also

  1. take the opportunity to move the SemiMonth offsets below the CustomBusinessMonth offsets so they're not in between BusinessMonth and CustomBusinessMonth.

  2. throw in some new asvs

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok trivial change. this patch is big enough!

@apply_wraps
def apply(self, other):
n = self.n
# First move to month offset
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

blank lines before comments

def apply(self, other):
n = self.n
dt_in = other
# First move to month offset
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@jbrockmendel
Copy link
Member Author

this patch is big enough!

Seriously, yah. Glad I broke it out from the other one.

@codecov
Copy link

codecov bot commented Nov 26, 2017

Codecov Report

Merging #18494 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@ Coverage Diff @@ ## master #18494 +/- ## ========================================== + Coverage 91.3% 91.32% +0.02%  ========================================== Files 163 163 Lines 49781 49781 ========================================== + Hits 45451 45463 +12  + Misses 4330 4318 -12
Flag Coverage Δ
#multiple 89.12% <100%> (+0.02%) ⬆️
#single 40.79% <49.27%> (+0.06%) ⬆️
Impacted Files Coverage Δ
pandas/tseries/offsets.py 97.03% <100%> (ø) ⬆️
pandas/plotting/_converter.py 65.25% <0%> (+1.81%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 38f41e6...0b8e242. Read the comment docs.

@jreback jreback added this to the 0.22.0 milestone Nov 26, 2017
@jreback jreback merged commit 78b24b2 into pandas-dev:master Nov 26, 2017
@jreback
Copy link
Contributor

jreback commented Nov 26, 2017

thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the parametrize_tests branch December 8, 2017 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frequency DateOffsets Testing pandas testing functions or related to the test suite

2 participants