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

Method test03_removeGroup

tables/tests/test_links.py:74–91  ·  view source on GitHub ↗

Removing a hard link to a Group.

(self)

Source from the content-addressed store, hash-verified

72 self.assertNotIn("/group1/larr1", self.h5file)
73
74 def test03_removeGroup(self):
75 """Removing a hard link to a Group."""
76
77 if common.verbose:
78 print("Original object tree:", self.h5file)
79 # First delete the initial link
80 self.h5file.root.group1._f_remove(force=True)
81 self.assertNotIn("/group1", self.h5file)
82 # The second link should still be there
83 if common.verbose:
84 print("Remaining link:", self.h5file.root.lgroup1)
85 print("Object tree:", self.h5file)
86 self.assertIn("/lgroup1", self.h5file)
87 # Remove the second link
88 self.h5file.root.lgroup1._g_remove(recursive=True)
89 self.assertNotIn("/lgroup1", self.h5file)
90 if common.verbose:
91 print("Final object tree:", self.h5file)
92
93
94# Test for soft links

Callers

nothing calls this directly

Calls 2

_f_removeMethod · 0.45
_g_removeMethod · 0.45

Tested by

no test coverage detected