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

Method test_subclass

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

Source from the content-addressed store, hash-verified

148 opt_out - array_like
149
150 def test_subclass(self):
151
152 class SubArrayLike(ArrayLike):
153 """Should take precedence over ArrayLike."""
154
155 x = ArrayLike(0)
156 y = SubArrayLike(1)
157 _assert_equal_type_and_value(x + y, y)
158 _assert_equal_type_and_value(y + x, y)
159
160 def test_object(self):
161 x = ArrayLike(0)

Callers

nothing calls this directly

Calls 3

SubArrayLikeClass · 0.85
ArrayLikeClass · 0.70

Tested by

no test coverage detected