Skip to content

Commit 484637d

Browse files
author
OlivierLuG
committed
TST pandas-dev#28981 comparison operation for interval dtypes
1 parent 63dda53 commit 484637d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pandas/tests/arithmetic/test_period.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1525,8 +1525,11 @@ def test_pi_sub_period_nat(self):
15251525

15261526
@pytest.mark.parametrize("scalars", ["a", False, 1, 1.0, None])
15271527
def test_comparison_operations(self, scalars):
1528-
# GH 28980
1528+
# GH #28980 and GH #28981
15291529
expected = Series([False, False])
15301530
s = Series([pd.Period("2019"), pd.Period("2020")], dtype="period[A-DEC]")
15311531
result = s == scalars
15321532
tm.assert_series_equal(result, expected)
1533+
s = pd.Series([pd.Interval(0, 1), pd.Interval(1, 2)], dtype="interval")
1534+
result = s == scalars
1535+
tm.assert_series_equal(result, expected)

0 commit comments

Comments
 (0)