Overwrite a soft link.
(self)
| 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.""" |
nothing calls this directly
no test coverage detected