Checking renaming a leave and access it after a close/open.
(self)
| 398 | self.h5file.root.atable |
| 399 | |
| 400 | def test07_renameLeaf(self): |
| 401 | """Checking renaming a leave and access it after a close/open.""" |
| 402 | |
| 403 | self._reopen(mode="r+", node_cache_slots=self.node_cache_slots) |
| 404 | self.h5file.rename_node(self.h5file.root.anarray, "anarray2") |
| 405 | |
| 406 | # Open this file in read-only mode |
| 407 | self._reopen(node_cache_slots=self.node_cache_slots) |
| 408 | |
| 409 | # Ensure that the new name exists |
| 410 | array_ = self.h5file.root.anarray2 |
| 411 | self.assertEqual(array_.name, "anarray2") |
| 412 | self.assertEqual(array_._v_pathname, "/anarray2") |
| 413 | self.assertEqual(array_._v_depth, 1) |
| 414 | |
| 415 | # Try to get the previous object with the old name |
| 416 | with self.assertRaises(LookupError): |
| 417 | self.h5file.root.anarray |
| 418 | |
| 419 | def test07b_renameLeaf(self): |
| 420 | """Checking renaming Leaves and accesing them immediately.""" |
nothing calls this directly
no test coverage detected