Exemplo n.º 1
0
def test_addOperationFinalised():
    operation_1 = GroupedOperation()
    operation_2 = GroupedOperation()

    operation_1.redo()  # The operation is now finalized, so it shouldn't be possible to add operations to it now.
    with pytest.raises(Exception):
        operation_1.addOperation(operation_2)
Exemplo n.º 2
0
def test_addOperationFinalised():
    operation_1 = GroupedOperation()
    operation_2 = GroupedOperation()

    operation_1.redo(
    )  # The operation is now finalized, so it shouldn't be possible to add operations to it now.
    with pytest.raises(Exception):
        operation_1.addOperation(operation_2)