Checking rename_node (over Groups without children)
(self)
| 1403 | populateTable(self.h5file.root, "table") |
| 1404 | |
| 1405 | def test00(self): |
| 1406 | """Checking rename_node (over Groups without children)""" |
| 1407 | |
| 1408 | if common.verbose: |
| 1409 | print("\n", "-=" * 30) |
| 1410 | print("Running %s.test00..." % self.__class__.__name__) |
| 1411 | |
| 1412 | # open the do/undo |
| 1413 | self.h5file.enable_undo() |
| 1414 | |
| 1415 | # Create a new array |
| 1416 | self.h5file.rename_node("/agroup2", "agroup3") |
| 1417 | |
| 1418 | # Now undo the past operation |
| 1419 | self.h5file.undo() |
| 1420 | |
| 1421 | # Check that it does not exist in the object tree |
| 1422 | self.assertIn("/agroup2", self.h5file) |
| 1423 | self.assertNotIn("/agroup3", self.h5file) |
| 1424 | self.assertEqual(self.h5file.root.agroup2._v_title, "Group title 2") |
| 1425 | |
| 1426 | # Redo the operation |
| 1427 | self.h5file.redo() |
| 1428 | |
| 1429 | # Check that otherarray has come back to life in a sane state |
| 1430 | self.assertNotIn("/agroup2", self.h5file) |
| 1431 | self.assertIn("/agroup3", self.h5file) |
| 1432 | self.assertEqual(self.h5file.root.agroup3._v_title, "Group title 2") |
| 1433 | |
| 1434 | def test01(self): |
| 1435 | """Checking rename_node (over Groups with children)""" |
nothing calls this directly
no test coverage detected