MCPcopy Create free account
hub / github.com/PyTables/PyTables / test03_overwrite

Method test03_overwrite

tables/tests/test_links.py:172–190  ·  view source on GitHub ↗

Overwrite a soft link.

(self)

Source from the content-addressed store, hash-verified

170 )
171
172 def test03_overwrite(self):
173 """Overwrite a soft link."""
174
175 # Copy the link into another location
176 root = self.h5file.root
177 lgroup1 = root.lgroup1
178 lgroup2 = lgroup1.copy("/", "lgroup2")
179 lgroup2 = lgroup1.copy("/", "lgroup2", overwrite=True)
180 self.assertIn("/lgroup1", self.h5file)
181 self.assertIn("/lgroup2", self.h5file)
182 self.assertIn("lgroup2", root._v_children)
183 self.assertIn("lgroup2", root._v_links)
184 if common.verbose:
185 print("Copied link:", lgroup2)
186 # Remove the first link
187 lgroup1.remove()
188 self._checkEqualityGroup(
189 self.h5file.root.group1, self.h5file.root.lgroup2()
190 )
191
192 def test04_move(self):
193 """Moving a soft link."""

Callers

nothing calls this directly

Calls 3

_checkEqualityGroupMethod · 0.80
copyMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected