diff --git a/pandas/tests/arithmetic/test_period.py b/pandas/tests/arithmetic/test_period.py index 9fc6568a019b6..d206622521816 100644 --- a/pandas/tests/arithmetic/test_period.py +++ b/pandas/tests/arithmetic/test_period.py @@ -1522,3 +1522,11 @@ def test_pi_sub_period_nat(self): exp = pd.TimedeltaIndex([np.nan, np.nan, np.nan, np.nan], name="idx") tm.assert_index_equal(idx - pd.Period("NaT", freq="M"), exp) tm.assert_index_equal(pd.Period("NaT", freq="M") - idx, exp) + + @pytest.mark.parametrize("scalars", ["a", False, 1, 1.0, None]) + def test_comparison_operations(self, scalars): + # GH 28980 + expected = Series([False, False]) + s = Series([pd.Period("2019"), pd.Period("2020")], dtype="period[A-DEC]") + result = s == scalars + tm.assert_series_equal(result, expected)