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

Method test04_move

tables/tests/test_links.py:192–206  ·  view source on GitHub ↗

Moving a soft link.

(self)

Source from the content-addressed store, hash-verified

190 )
191
192 def test04_move(self):
193 """Moving a soft link."""
194
195 # Move the link into another location
196 lgroup1 = self.h5file.root.lgroup1
197 group2 = self.h5file.create_group("/", "group2")
198 lgroup1.move(group2, "lgroup2")
199 lgroup2 = self.h5file.root.group2.lgroup2
200 if common.verbose:
201 print("Moved link:", lgroup2)
202 self.assertNotIn("/lgroup1", self.h5file)
203 self.assertIn("/group2/lgroup2", self.h5file)
204 self._checkEqualityGroup(
205 self.h5file.root.group1, self.h5file.root.group2.lgroup2()
206 )
207
208 def test05_rename(self):
209 """Renaming a soft link."""

Callers

nothing calls this directly

Calls 3

create_groupMethod · 0.80
_checkEqualityGroupMethod · 0.80
moveMethod · 0.45

Tested by

no test coverage detected