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