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

Method test03_copy

tables/tests/test_links.py:153–170  ·  view source on GitHub ↗

Copying a soft link.

(self)

Source from the content-addressed store, hash-verified

151 self.assertNotIn("/group1/larr1", self.h5file)
152
153 def test03_copy(self):
154 """Copying a soft link."""
155
156 # Copy the link into another location
157 root = self.h5file.root
158 lgroup1 = root.lgroup1
159 lgroup2 = lgroup1.copy("/", "lgroup2")
160 self.assertIn("/lgroup1", self.h5file)
161 self.assertIn("/lgroup2", self.h5file)
162 self.assertIn("lgroup2", root._v_children)
163 self.assertIn("lgroup2", root._v_links)
164 if common.verbose:
165 print("Copied link:", lgroup2)
166 # Remove the first link
167 lgroup1.remove()
168 self._checkEqualityGroup(
169 self.h5file.root.group1, self.h5file.root.lgroup2()
170 )
171
172 def test03_overwrite(self):
173 """Overwrite 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