def test_updating_tape():
    q0, q1, qa, qr = create_example_from_spec()
    tm = TuringMachine("aab", qa, qr, q0)
    assert tm.begin()
    tm.new_tape("aba")
    assert tm.begin() is False
def test_example_spec_aba():
    q0, q1, qa, qr = create_example_from_spec()
    tm = TuringMachine('aba', qa, qr, q0)
    assert tm.begin() == False