Checking moving a leave and access it after a close/open.
(self)
| 582 | ) |
| 583 | |
| 584 | def test10_moveLeaf(self): |
| 585 | """Checking moving a leave and access it after a close/open.""" |
| 586 | |
| 587 | self._reopen(mode="r+", node_cache_slots=self.node_cache_slots) |
| 588 | newgroup = self.h5file.create_group("/", "newgroup") |
| 589 | self.h5file.move_node(self.h5file.root.anarray, newgroup, "anarray2") |
| 590 | |
| 591 | # Open this file in read-only mode |
| 592 | self._reopen(node_cache_slots=self.node_cache_slots) |
| 593 | |
| 594 | # Ensure that the new name exists |
| 595 | array_ = self.h5file.root.newgroup.anarray2 |
| 596 | self.assertEqual(array_.name, "anarray2") |
| 597 | self.assertEqual(array_._v_pathname, "/newgroup/anarray2") |
| 598 | self.assertEqual(array_._v_depth, 2) |
| 599 | |
| 600 | # Try to get the previous object with the old name |
| 601 | with self.assertRaises(LookupError): |
| 602 | self.h5file.root.anarray |
| 603 | |
| 604 | def test10b_moveLeaf(self): |
| 605 | """Checking moving a leave and access it without a close/open.""" |
nothing calls this directly
no test coverage detected