def test_spaced_repeat(): # It contains at least one letter which repeats with exactly one letter # between them, like xyx, abcdefeghi (efe), or even aaa. assert True == newnicestring.has_spaced_repeat("xyx") assert True == newnicestring.has_spaced_repeat("abcdefeghi") assert True == newnicestring.has_spaced_repeat("aaa") assert True == newnicestring.has_spaced_repeat("bcdefgf")
def test_no_spaced_repeat(): assert False == newnicestring.has_spaced_repeat("abcdefggh")