MCPcopy Create free account
hub / github.com/numpy/numpy / test_filename

Method test_filename

numpy/core/tests/test_memmap.py:67–77  ·  view source on GitHub ↗
(self, tmp_path)

Source from the content-addressed store, hash-verified

65 del fp
66
67 def test_filename(self, tmp_path):
68 tmpname = tmp_path / "mmap"
69 fp = memmap(tmpname, dtype=self.dtype, mode='w+',
70 shape=self.shape)
71 abspath = Path(os.path.abspath(tmpname))
72 fp[:] = self.data[:]
73 assert_equal(abspath, fp.filename)
74 b = fp[:1]
75 assert_equal(abspath, b.filename)
76 del b
77 del fp
78
79 def test_path(self, tmp_path):
80 tmpname = tmp_path / "mmap"

Callers

nothing calls this directly

Calls 3

memmapClass · 0.90
assert_equalFunction · 0.90
abspathMethod · 0.45

Tested by

no test coverage detected