Beispiel #1
0
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")
Beispiel #2
0
def test_no_spaced_repeat():
    assert False == newnicestring.has_spaced_repeat("abcdefggh")