ENH: Period comparisons with mismatched freq use py3 behavior by jbrockmendel · Pull Request #39274 · pandas-dev/pandas (original) (raw)
@@ -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"