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

Method test_inf_compare_array

numpy/testing/tests/test_utils.py:1128–1137  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1126 assert_raises(AssertionError, lambda: self._assert_func(-ainf, -ainf))
1127
1128 def test_inf_compare_array(self):
1129 x = np.array([1.1, 2.2, np.inf])
1130 ainf = np.array(np.inf)
1131
1132 assert_raises(AssertionError, lambda: self._assert_func(x, ainf))
1133 assert_raises(AssertionError, lambda: self._assert_func(ainf, x))
1134 assert_raises(AssertionError, lambda: self._assert_func(x, -ainf))
1135 assert_raises(AssertionError, lambda: self._assert_func(-x, -ainf))
1136 assert_raises(AssertionError, lambda: self._assert_func(-ainf, -x))
1137 self._assert_func(-ainf, x)
1138
1139 def test_strict(self):
1140 """Test the behavior of the `strict` option."""

Callers

nothing calls this directly

Calls 2

_assert_funcMethod · 0.95
assert_raisesFunction · 0.90

Tested by

no test coverage detected