Skip to content

Commit 64fdfd1

Browse files
TST: use custom parametrization for consistency in base extension array tests (#44332)
1 parent 5a404d5 commit 64fdfd1

File tree

1 file changed

+3
-4
lines changed
  • pandas/tests/extension/base

1 file changed

+3
-4
lines changed

pandas/tests/extension/base/ops.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,12 @@ def test_compare_array(self, data, comparison_op):
162162
other = pd.Series([data[0]] * len(data))
163163
self._compare_other(ser, data, comparison_op, other)
164164

165-
def test_direct_arith_with_ndframe_returns_not_implemented(
166-
self, data, frame_or_series
167-
):
165+
@pytest.mark.parametrize("box", [pd.Series, pd.DataFrame])
166+
def test_direct_arith_with_ndframe_returns_not_implemented(self, data, box):
168167
# EAs should return NotImplemented for ops with Series/DataFrame
169168
# Pandas takes care of unboxing the series and calling the EA's op.
170169
other = pd.Series(data)
171-
if frame_or_series is pd.DataFrame:
170+
if box is pd.DataFrame:
172171
other = other.to_frame()
173172

174173
if hasattr(data, "__eq__"):

0 commit comments

Comments
 (0)