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

Method test_failing_prepare

numpy/core/tests/test_umath.py:3197–3208  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3195 assert_equal(type(x), with_prepare)
3196
3197 def test_failing_prepare(self):
3198
3199 class A:
3200 def __array__(self):
3201 return np.zeros(1)
3202
3203 def __array_prepare__(self, arr, context=None):
3204 raise RuntimeError
3205
3206 a = A()
3207 assert_raises(RuntimeError, ncu.maximum, a, a)
3208 assert_raises(RuntimeError, ncu.maximum, a, a, where=False)
3209
3210 def test_array_too_many_args(self):
3211

Callers

nothing calls this directly

Calls 2

assert_raisesFunction · 0.90
AClass · 0.70

Tested by

no test coverage detected