(self, dtype)
| 2281 | |
| 2282 | @pytest.mark.parametrize("dtype", ['O', np.int32, 'i,O']) |
| 2283 | def test__deepcopy__(self, dtype): |
| 2284 | # Force the entry of NULLs into array |
| 2285 | a = np.empty(4, dtype=dtype) |
| 2286 | ctypes.memset(a.ctypes.data, 0, a.nbytes) |
| 2287 | |
| 2288 | # Ensure no error is raised, see gh-21833 |
| 2289 | b = a.__deepcopy__({}) |
| 2290 | |
| 2291 | a[0] = 42 |
| 2292 | with pytest.raises(AssertionError): |
| 2293 | assert_array_equal(a, b) |
| 2294 | |
| 2295 | def test__deepcopy__catches_failure(self): |
| 2296 | class MyObj: |
nothing calls this directly
no test coverage detected