def test04_replaceNode(self):
        """Replacing a node with a rewritten attribute"""

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

        array = self.h5file.root.array
        attrs = array.attrs

        self.h5file.enable_undo()
        attrs.attr_1 = 11
        self.h5file.remove_node('/array')
        arr = self.h5file.create_array('/', 'array', [1])
        arr.attrs.attr_1 = 12
        self.h5file.undo()
        self.assertTrue('attr_1' in self.h5file.root.array.attrs)
        self.assertEqual(self.h5file.root.array.attrs.attr_1, 10)
        self.h5file.redo()
        self.assertTrue(self.h5file.root.array.attrs in 'attr_1')
        self.assertEqual(self.h5file.root.array.attrs.attr_1, 12)
dataset/ETHPy150Open PyTables/PyTables/tables/tests/test_do_undo.py/AttributesTestCase.test04_replaceNode/swapped operands of `in`