def demo_6times3marks():
    """Checking with six ops and three marks."""

    # Initialize the data base with some nodes
    fileh = setUp("undo-redo-6times3marks.h5")

    # Create a new array
    fileh.create_array('/', 'otherarray1', [3, 4], "Another array 1")
    fileh.create_array('/', 'otherarray2', [4, 5], "Another array 2")
    # Put a mark
    fileh.mark()
    fileh.create_array('/', 'otherarray3', [5, 6], "Another array 3")
    fileh.create_array('/', 'otherarray4', [6, 7], "Another array 4")
    # Put a mark
    fileh.mark()
    fileh.create_array('/', 'otherarray5', [7, 8], "Another array 5")
    fileh.create_array('/', 'otherarray6', [8, 9], "Another array 6")
    # Unwind just one mark
    fileh.undo()
    assert "/otherarray1" in fileh
    assert "/otherarray2" in fileh
    assert "/otherarray3" in fileh
    assert "/otherarray4" in fileh
    assert "/otherarray5" not in fileh
    assert "/otherarray6" not in fileh
    # Unwind another mark
    fileh.undo()
    assert "/otherarray1" in fileh
    assert "/otherarray2" in fileh
    assert "/otherarray3" not in fileh
    assert "/otherarray4" not in fileh
    assert "/otherarray5" not in fileh
    assert "/otherarray6" not in fileh
    # Unwind all marks
    fileh.undo()
    assert "/otherarray1" not in fileh
    assert "/otherarray2" not in fileh
    assert "/otherarray3" not in fileh
    assert "/otherarray4" not in fileh
    assert "/otherarray5" not in fileh
    assert "/otherarray6" not in fileh
    # Redo until the next mark
    fileh.redo()
    assert "/otherarray1" in fileh
    assert "/otherarray2" in fileh
    assert "/otherarray3" not in fileh
    assert "/otherarray4" not in fileh
    assert "/otherarray5" not in fileh
    assert "/otherarray6" not in fileh
    # Redo until the next mark
    fileh.redo()
    assert "/otherarray1" in fileh
    assert "/otherarray2" in fileh
    assert "/otherarray3" in fileh
    assert "/otherarray4" in fileh
    assert "/otherarray5" not in fileh
    assert "/otherarray6" not in fileh
    # Redo until the end
    fileh.redo()
    assert "/otherarray1" in fileh
    assert "/otherarray2" in fileh
    assert "/otherarray3" in fileh
    assert "/otherarray4" in fileh
    assert "/otherarray5" in fileh
    assert "/otherarray6" in fileh

    # Tear down the file
    tearDown(fileh)
dataset/ETHPy150Open PyTables/PyTables/examples/undo-redo.py/demo_6times3marks/original