def test13_severalEnableDisable(self):
        """Checking that successive enable/disable Undo works"""

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

        self.h5file.enable_undo()
        self.h5file.create_array('/', 'newarray1', [1])
        self.h5file.undo()
        self._do_reopen()

        # We should have moved to 'mid' mark, not the initial mark.
        self.assertEqual(self.h5file.get_current_mark(), 0)

        # So /newarray1 should still be there.
        self.assertTrue('/newarray1' not in self.h5file)

        # Close this do/undo session
        self.h5file.disable_undo()

        # Do something
        self.h5file.create_array('/', 'newarray2', [1])

        # Enable again do/undo
        self.h5file.enable_undo()
        self.h5file.create_array('/', 'newarray3', [1])
        mid = self.h5file.mark()
        self.h5file.create_array('/', 'newarray4', [1])
        self.h5file.undo()

        # We should have moved to 'mid' mark, not the initial mark.
        self.assertEqual(self.h5file.get_current_mark(), mid)

        # So /newarray2 and /newarray3 should still be there.
        self.assertTrue('/newarray1' not in self.h5file)
        self.assertTrue('/newarray2' in self.h5file)
        self.assertTrue('/newarray3' in self.h5file)
        self.assertTrue('/newarray4' not in self.h5file)

        # Close this do/undo session
        self._do_reopen()
        self.h5file.disable_undo()

        # Enable again do/undo
        self.h5file.enable_undo()
        self.h5file.create_array('/', 'newarray1', [1])
        self.h5file.create_array('/', 'newarray4', [1])

        # So /newarray2 and /newarray3 should still be there.
        self.assertTrue('/newarray1' in self.h5file)
        self.assertTrue('/newarray2' in self.h5file)
        self.assertTrue('/newarray3' in self.h5file)
        self.assertTrue('/newarray4' in self.h5file)
        self.h5file.undo()
        self._do_reopen()
        self.assertTrue('/newarray1' not in self.h5file)
        self.assertTrue('/newarray2' in self.h5file)
        self.assertTrue('/newarray3' in self.h5file)
        self.assertTrue(self.h5file not in '/newarray4')

        # Close this do/undo session
        self.h5file.disable_undo()
dataset/ETHPy150Open PyTables/PyTables/tables/tests/test_do_undo.py/BasicTestCase.test13_severalEnableDisable/swapped operands of `not in`