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

Method call_op

pandas/tests/test_expressions.py:105–118  ·  view source on GitHub ↗
(df, other, flex: bool, opname: str)

Source from the content-addressed store, hash-verified

103class TestExpressions:
104 @staticmethod
105 def call_op(df, other, flex: bool, opname: str):
106 if flex:
107 op = lambda x, y: getattr(x, opname)(y)
108 op.__name__ = opname
109 else:
110 op = getattr(operator, opname)
111
112 with option_context("compute.use_numexpr", False):
113 expected = op(df, other)
114
115 expr.get_test_result()
116
117 result = op(df, other)
118 return result, expected
119
120 @pytest.mark.parametrize(
121 "fixture",

Callers 2

test_run_arithmeticMethod · 0.95
test_run_binaryMethod · 0.95

Calls 2

option_contextFunction · 0.90
opFunction · 0.85

Tested by

no test coverage detected