def test_find_pattern_has_repeat_after_filler(): """Confirm that if pattern exists, we detect it.""" has_repeat = ['0', '1', '2', '1', '2', '1', '2'] assert find_pattern(has_repeat) == 2
def test_find_pattern_no_repeat(): """Confirm that if no pattern exists, we get 0.""" no_repeat = ['1', '2', '5'] assert find_pattern(no_repeat) == 0