def test00_copyLeaf(self):
        """Checking copy_node (over Leaves)"""

        if common.verbose:
            print('\n', '-=' * 30)
            print("Running %s.test00_copyLeaf..." % self.__class__.__name__)

        # Enable undo/redo.
        self.h5file.enable_undo()

        # /anarray => /agroup/agroup3/
        new_node = self.h5file.copy_node('/anarray', '/agroup/agroup3')

        # Undo the copy.
        self.h5file.undo()

        # Check that the copied node does not exist in the object tree.
        self.assertTrue('/agroup/agroup3/anarray' not in self.h5file)

        # Redo the copy.
        self.h5file.redo()

        # Check that the copied node exists again in the object tree.
        self.assertTrue('/agroup/agroup3/anarray' in self.h5file)
        self.assertTrue(self.h5file.root.agroup.agroup3.anarray is new_node)
dataset/ETHPy150Open PyTables/PyTables/tables/tests/test_do_undo.py/CopyNodeTestCase.test00_copyLeaf/original