def test_problem3_04(): seq1, seq2 = 'ab', 'b' expect = 1 result = quiz.cost_to_consume(seq1, seq2) assert expect == result, "wrong cost_to_consume("+repr(seq1)+","+repr(seq2)+")" seq1, seq2 = 'b', 'ab' expect = 1 result = quiz.cost_to_consume(seq1, seq2) assert expect == result, "wrong cost_to_consume("+repr(seq1)+","+repr(seq2)+")"
def test_problem3_08(): size = 8 seq1, seq2, expect = ('a'*size, 'b'*size, size) result = quiz.cost_to_consume(seq1, seq2) assert expect == result, "wrong cost_to_consume("+repr(seq1)+","+repr(seq2)+")"
def test_problem3_07(subcase): # Harder cases seq1, seq2, expect = subcase result = quiz.cost_to_consume(seq1, seq2) assert expect == result, "wrong cost_to_consume("+repr(seq1)+","+repr(seq2)+")"
def test_problem3_01(): seq1, seq2 = '', '' expect = 0 result = quiz.cost_to_consume(seq1, seq2) assert expect == result, "wrong cost_to_consume("+repr(seq1)+","+repr(seq2)+")"