MCPcopy
hub / github.com/pandas-dev/pandas / testit

Method testit

pandas/tests/test_expressions.py:220–232  ·  view source on GitHub ↗
(left, right, opname, op_str)

Source from the content-addressed store, hash-verified

218 right = request.getfixturevalue(right_fix)
219
220 def testit(left, right, opname, op_str):
221 if opname == "pow":
222 left = np.abs(left)
223
224 op = getattr(operator, opname)
225
226 # array has 0s
227 result = expr.evaluate(op, left, left, use_numexpr=True)
228 expected = expr.evaluate(op, left, left, use_numexpr=False)
229 tm.assert_numpy_array_equal(result, expected)
230
231 result = expr._can_use_numexpr(op, op_str, right, right, "evaluate")
232 assert not result
233
234 with option_context("compute.use_numexpr", False):
235 testit(left, right, opname, op_str)

Callers

nothing calls this directly

Calls 4

absMethod · 0.80
evaluateMethod · 0.45
emptyMethod · 0.45
whereMethod · 0.45

Tested by

no test coverage detected