Skip to content

Commit 0c7b704

Browse files
committed
extension tests passing
1 parent d68a5c5 commit 0c7b704

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

pandas/tests/extension/test_period.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import numpy as np
33

44
import pandas as pd
5+
import pandas.util.testing as tm
56
from pandas._libs.tslib import iNaT
67
from pandas.tests.extension import base
78
from pandas.core.dtypes.dtypes import PeriodDtype
@@ -95,6 +96,12 @@ def _check_divmod_op(self, s, op, other, exc=NotImplementedError):
9596
s, op, other, exc=TypeError
9697
)
9798

99+
def test_add_series_with_extension_array(self, data):
100+
# we don't implement + for Period
101+
s = pd.Series(data)
102+
with tm.assert_raises_regex(TypeError, "cannot add period\[D\]"):
103+
s + data
104+
98105
def test_error(self):
99106
pass
100107

@@ -105,7 +112,7 @@ class TestCasting(BasePeriodTests, base.BaseCastingTests):
105112

106113
class TestComparisonOps(BasePeriodTests, base.BaseComparisonOpsTests):
107114

108-
def _compare_other(self):
115+
def _compare_other(self, s, data, op_name, other):
109116
# the base test is not appropriate for us. We raise on comparison
110117
# with (some) integers, depending on the value.
111118
pass

0 commit comments

Comments
 (0)