-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
ENH: Period comparisons with mismatched freq use py3 behavior #39274
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
jbrockmendel
commented
Jan 19, 2021
- closes #xxxx
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
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.
lgtm. minor comments. ping on green.
@@ -354,12 +354,13 @@ def test_pi_cmp_nat_mismatched_freq_raises(self, freq): | |||
idx1 = PeriodIndex(["2011-01", "2011-02", "NaT", "2011-05"], freq=freq) | |||
|
|||
diff = PeriodIndex(["2011-02", "2011-01", "2011-04", "NaT"], freq="4M") | |||
msg = "Input has different freq=4M from Period(Array|Index)" | |||
with pytest.raises(IncompatibleFrequency, match=msg): | |||
msg = rf"Invalid comparison between dtype=period\[{freq}\] and PeriodArray" |
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.
prob should either rename the tests slightly or separate out the == case (and test != as well)
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.
will rename for now. i think we may be able to re-use a helper from the dt64 tests, will take a look before long