Checking renaming a Group and access it immediately.
(self)
| 510 | self.h5file.get_node("/agroup/agroup3") |
| 511 | |
| 512 | def test09b_renameGroup(self): |
| 513 | """Checking renaming a Group and access it immediately.""" |
| 514 | |
| 515 | self._reopen(mode="r+", node_cache_slots=self.node_cache_slots) |
| 516 | self.h5file.rename_node(self.h5file.root.agroup, "agroup3") |
| 517 | |
| 518 | # Ensure that the new name exists |
| 519 | group = self.h5file.root.agroup3 |
| 520 | self.assertEqual(group._v_name, "agroup3") |
| 521 | self.assertEqual(group._v_pathname, "/agroup3") |
| 522 | |
| 523 | # The children of this group also must be accessible through the |
| 524 | # new name path |
| 525 | group2 = self.h5file.get_node("/agroup3/agroup3") |
| 526 | self.assertEqual(group2._v_name, "agroup3") |
| 527 | self.assertEqual(group2._v_pathname, "/agroup3/agroup3") |
| 528 | |
| 529 | # Try to get the previous object with the old name |
| 530 | with self.assertRaises(LookupError): |
| 531 | self.h5file.root.agroup |
| 532 | |
| 533 | # Try to get a child with the old pathname |
| 534 | with self.assertRaises(LookupError): |
| 535 | self.h5file.get_node("/agroup/agroup3") |
| 536 | |
| 537 | def test09c_renameGroup(self): |
| 538 | """Checking renaming a Group and modify attributes afterwards.""" |
nothing calls this directly
no test coverage detected