Checking moving a table and access it after a close/open.
(self)
| 643 | ) |
| 644 | |
| 645 | def test10_2_moveTable(self): |
| 646 | """Checking moving a table and access it after a close/open.""" |
| 647 | |
| 648 | self._reopen(mode="r+", node_cache_slots=self.node_cache_slots) |
| 649 | newgroup = self.h5file.create_group("/", "newgroup") |
| 650 | self.h5file.move_node(self.h5file.root.atable, newgroup, "atable2") |
| 651 | |
| 652 | # Open this file in read-only mode |
| 653 | self._reopen(node_cache_slots=self.node_cache_slots) |
| 654 | |
| 655 | # Ensure that the new name exists |
| 656 | table_ = self.h5file.root.newgroup.atable2 |
| 657 | self.assertEqual(table_.name, "atable2") |
| 658 | self.assertEqual(table_._v_pathname, "/newgroup/atable2") |
| 659 | self.assertEqual(table_._v_depth, 2) |
| 660 | |
| 661 | # Try to get the previous object with the old name |
| 662 | with self.assertRaises(LookupError): |
| 663 | self.h5file.root.atable |
| 664 | |
| 665 | def test10_2b_moveTable(self): |
| 666 | """Checking moving a table and access it without a close/open.""" |
nothing calls this directly
no test coverage detected