def test_pattern_is_repeated_true(): """Confirm that if pattern exists, we get True.""" pattern = ['2', '4'] offset = 1 in_list = ['1', '2', '4', '2', '4', '2', '4', '2'] assert pattern_is_repeated(pattern, offset, in_list) == True
def test_pattern_is_repeated_false(): """Confirm that if pattern does not exist, we get False.""" pattern = ['1', '2'] offset = 0 in_list = ['1', '2', '4', '2', '4', '2', '4'] assert pattern_is_repeated(pattern, offset, in_list) == False