コード例 #1
0
def test_equal_len():
    for i in range(10):
        s1 = [random.randint(0, 10) for i in range(random.randint(40, 50))]
        s2 = [random.randint(0, 10) for i in range(random.randint(40, 50))]
        ss = (s1, s2)
        assert dl.lcs_len(s1, s2) == dl.lcs_matrix(s1, s2)[-1][-1]
        both = dl.lcs_low_m_anlcs(s1, s2)
        assert both.length == dl.lcs_len(*ss)
        assert both.length == len(both.lcs)
コード例 #2
0
ファイル: test.py プロジェクト: Carreau/difflib2.py
def test_equal_len():
    for i in range(10):
        s1 = [random.randint(0,10) for i in range(random.randint(40,50))]
        s2 = [random.randint(0,10) for i in range(random.randint(40,50))]
        ss = (s1,s2)
        assert dl.lcs_len(s1,s2) == dl.lcs_matrix(s1,s2)[-1][-1]
        both = dl.lcs_low_m_anlcs(s1,s2)
        assert both.length == dl.lcs_len(*ss)
        assert both.length == len(both.lcs)
コード例 #3
0
def test_empy_matrix():
    assert dl.lcs_matrix('', '') == []
コード例 #4
0
ファイル: test.py プロジェクト: Carreau/difflib2.py
def test_empy_matrix():
    assert dl.lcs_matrix('','') == []