MCPcopy Create free account
hub / github.com/numpy/numpy / test_override_sum

Method test_override_sum

numpy/core/tests/test_overrides.py:496–503  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

494 assert_('axis' in signature.parameters)
495
496 def test_override_sum(self):
497 MyArray, implements = _new_duck_type_and_implements()
498
499 @implements(np.sum)
500 def _(array):
501 return 'yes'
502
503 assert_equal(np.sum(MyArray()), 'yes')
504
505 def test_sum_on_mock_array(self):
506

Callers

nothing calls this directly

Calls 4

assert_equalFunction · 0.90
MyArrayClass · 0.70
sumMethod · 0.45

Tested by

no test coverage detected