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

Method test_del

numpy/_core/tests/test_memmap.py:115–127  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

113 fp.flush()
114
115 def test_del(self):
116 # Make sure a view does not delete the underlying mmap
117 fp_base = memmap(self.tmpfp, dtype=self.dtype, mode='w+',
118 shape=self.shape)
119 fp_base[0] = 5
120 fp_view = fp_base[0:1]
121 assert_equal(fp_view[0], 5)
122 del fp_view
123 # Should still be able to access and assign values after
124 # deleting the view
125 assert_equal(fp_base[0], 5)
126 fp_base[0] = 6
127 assert_equal(fp_base[0], 6)
128
129 def test_arithmetic_drops_references(self):
130 fp = memmap(self.tmpfp, dtype=self.dtype, mode='w+',

Callers

nothing calls this directly

Calls 2

memmapClass · 0.90
assert_equalFunction · 0.90

Tested by

no test coverage detected