From 9a0cf8d55bb68fc3a9ee28b3d5e6b1182cacf9dc Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Sat, 6 Nov 2021 11:06:42 +0100 Subject: [PATCH] TST: use custom parametrization for consistency in base extension array tests --- pandas/tests/extension/base/ops.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pandas/tests/extension/base/ops.py b/pandas/tests/extension/base/ops.py index c52f20255eb81..1d3d736ca7ee2 100644 --- a/pandas/tests/extension/base/ops.py +++ b/pandas/tests/extension/base/ops.py @@ -162,13 +162,12 @@ def test_compare_array(self, data, comparison_op): other = pd.Series([data[0]] * len(data)) self._compare_other(ser, data, comparison_op, other) - def test_direct_arith_with_ndframe_returns_not_implemented( - self, data, frame_or_series - ): + @pytest.mark.parametrize("box", [pd.Series, pd.DataFrame]) + def test_direct_arith_with_ndframe_returns_not_implemented(self, data, box): # EAs should return NotImplemented for ops with Series/DataFrame # Pandas takes care of unboxing the series and calling the EA's op. other = pd.Series(data) - if frame_or_series is pd.DataFrame: + if box is pd.DataFrame: other = other.to_frame() if hasattr(data, "__eq__"):