コード例 #1
0
ファイル: test.py プロジェクト: jmhobbs/advent-of-code-2015
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")
コード例 #2
0
ファイル: test.py プロジェクト: jmhobbs/advent-of-code-2015
def test_no_spaced_repeat():
    assert False == newnicestring.has_spaced_repeat("abcdefggh")