MCPcopy Index your code
hub / github.com/numpy/numpy / test_filename

Method test_filename

numpy/_core/tests/test_memmap.py:74–84  ·  view source on GitHub ↗
(self, tmp_path)

Source from the content-addressed store, hash-verified

72 del fp
73
74 def test_filename(self, tmp_path):
75 tmpname = tmp_path / "mmap"
76 fp = memmap(tmpname, dtype=self.dtype, mode='w+',
77 shape=self.shape)
78 abspath = Path(os.path.abspath(tmpname))
79 fp[:] = self.data[:]
80 assert_equal(abspath, fp.filename)
81 b = fp[:1]
82 assert_equal(abspath, b.filename)
83 del b
84 del fp
85
86 def test_path(self, tmp_path):
87 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