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

Method test_object

numpy/lib/tests/test_mixins.py:160–168  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

158 _assert_equal_type_and_value(y + x, y)
159
160 def test_object(self):
161 x = ArrayLike(0)
162 obj = object()
163 with assert_raises(TypeError):
164 x + obj
165 with assert_raises(TypeError):
166 obj + x
167 with assert_raises(TypeError):
168 x += obj
169
170 def test_unary_methods(self):
171 array = np.array([-1, 0, 1, 2])

Callers

nothing calls this directly

Calls 2

assert_raisesFunction · 0.90
ArrayLikeClass · 0.70

Tested by

no test coverage detected