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

Function test_pandas_priority

pandas/tests/test_downstream.py:236–249  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

234
235
236def test_pandas_priority():
237 # GH#48347
238
239 class MyClass:
240 __pandas_priority__ = 5000
241
242 def __radd__(self, other):
243 return self
244
245 left = MyClass()
246 right = Series(range(3))
247
248 assert right.__add__(left) is NotImplemented
249 assert right + left is left
250
251
252@pytest.mark.parametrize("dtype", ["M8[ns]", "m8[ns]"])

Callers

nothing calls this directly

Calls 3

SeriesClass · 0.90
MyClassClass · 0.85
__add__Method · 0.45

Tested by

no test coverage detected