def test_lz_get_ref_factors(self): """ LZ FACTORISATION: Get only reference factors for a string """ reference_factors = refs("ABCAB") expected = ((0, 2),) assert_equal(reference_factors, expected) reference_factors = refs("ABCAB2B2") expected = ((0, 2), (4, 2)) assert_equal(reference_factors, expected)
def test_lz_get_ref_factors(self): """ LZ FACTORISATION: Get only reference factors for a string """ reference_factors = refs("ABCAB") expected = ((0, 2), ) assert_equal(reference_factors, expected) reference_factors = refs("ABCAB2B2") expected = ((0, 2), (4, 2)) assert_equal(reference_factors, expected)
def test_lz_refs_empty_string(self): """ LZ FACTORISATION: Get reference factors from empty string """ factors = refs("")