Removing a hard link to a Group.
(self)
| 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 |