(self, tmp_path)
| 77 | del fp |
| 78 | |
| 79 | def test_path(self, tmp_path): |
| 80 | tmpname = tmp_path / "mmap" |
| 81 | fp = memmap(Path(tmpname), dtype=self.dtype, mode='w+', |
| 82 | shape=self.shape) |
| 83 | # os.path.realpath does not resolve symlinks on Windows |
| 84 | # see: https://bugs.python.org/issue9949 |
| 85 | # use Path.resolve, just as memmap class does internally |
| 86 | abspath = str(Path(tmpname).resolve()) |
| 87 | fp[:] = self.data[:] |
| 88 | assert_equal(abspath, str(fp.filename.resolve())) |
| 89 | b = fp[:1] |
| 90 | assert_equal(abspath, str(b.filename.resolve())) |
| 91 | del b |
| 92 | del fp |
| 93 | |
| 94 | def test_filename_fileobj(self): |
| 95 | fp = memmap(self.tmpfp, dtype=self.dtype, mode="w+", |
nothing calls this directly
no test coverage detected