Test the behavior of the `strict` option.
(self)
| 1137 | self._assert_func(-ainf, x) |
| 1138 | |
| 1139 | def test_strict(self): |
| 1140 | """Test the behavior of the `strict` option.""" |
| 1141 | x = np.zeros(3) |
| 1142 | y = np.ones(()) |
| 1143 | self._assert_func(x, y) |
| 1144 | with pytest.raises(AssertionError): |
| 1145 | self._assert_func(x, y, strict=True) |
| 1146 | y = np.broadcast_to(y, x.shape) |
| 1147 | self._assert_func(x, y) |
| 1148 | with pytest.raises(AssertionError): |
| 1149 | self._assert_func(x, y.astype(np.float32), strict=True) |
| 1150 | |
| 1151 | @pytest.mark.filterwarnings( |
| 1152 | "ignore:.*NumPy warning suppression and assertion utilities are deprecated" |
nothing calls this directly
no test coverage detected