(self)
| 30 | break_cycles() |
| 31 | |
| 32 | def test_roundtrip(self): |
| 33 | # Write data to file |
| 34 | fp = memmap(self.tmpfp, dtype=self.dtype, mode='w+', |
| 35 | shape=self.shape) |
| 36 | fp[:] = self.data[:] |
| 37 | del fp # Test __del__ machinery, which handles cleanup |
| 38 | |
| 39 | # Read data back from file |
| 40 | newfp = memmap(self.tmpfp, dtype=self.dtype, mode='r', |
| 41 | shape=self.shape) |
| 42 | assert_(allclose(self.data, newfp)) |
| 43 | assert_array_equal(self.data, newfp) |
| 44 | assert_equal(newfp.flags.writeable, False) |
| 45 | |
| 46 | def test_open_with_filename(self, tmp_path): |
| 47 | tmpname = tmp_path / 'mmap' |
nothing calls this directly
no test coverage detected