We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0d8aa09 commit 1f8a5d6Copy full SHA for 1f8a5d6
pandas/tests/frame/test_arithmetic.py
@@ -126,18 +126,14 @@ def test_df_add_flex_filled_mixed_dtypes(self):
126
'B': ser * 2})
127
tm.assert_frame_equal(result, expected)
128
129
- @pytest.mark.parametrize('op', ['add', 'sub', 'mul', 'div', 'truediv',
130
- 'pow', 'floordiv', 'mod'])
131
- def test_arith_flex_frame(self, op, int_frame, mixed_int_frame,
132
- float_frame, mixed_float_frame):
133
-
134
- if not PY3:
135
- aliases = {}
136
- else:
137
- aliases = {'div': 'truediv'}
138
- alias = aliases.get(op, op)
139
140
- f = getattr(operator, alias)
+ def test_arith_flex_frame(self, all_arithmetic_operators, int_frame,
+ mixed_int_frame, float_frame, mixed_float_frame):
+
+ op = all_arithmetic_operators
+ if op.startswith('__r'):
+ pytest.skip('Reverse methods not available in operator library')
+ f = getattr(operator, op)
141
result = getattr(float_frame, op)(2 * float_frame)
142
exp = f(float_frame, 2 * float_frame)
143
tm.assert_frame_equal(result, exp)
0 commit comments