MCPcopy Index your code
hub / github.com/numpy/numpy / test_exception_handling

Method test_exception_handling

numpy/_core/tests/test_overrides.py:741–749  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

739 assert array_like.function is MyArray.fromfile
740
741 def test_exception_handling(self):
742 MyArray = self._create_MyArray()
743 self.add_method('array', MyArray, enable_value_error=True)
744
745 ref = MyArray.array()
746
747 with assert_raises(TypeError):
748 # Raises the error about `value_error` being invalid first
749 np.array(1, value_error=True, like=ref)
750
751 @pytest.mark.parametrize('function, args, kwargs', _array_tests)
752 def test_like_as_none(self, function, args, kwargs):

Callers

nothing calls this directly

Calls 3

_create_MyArrayMethod · 0.95
add_methodMethod · 0.95
assert_raisesFunction · 0.90

Tested by

no test coverage detected