Exemplo n.º 1
0
 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)
Exemplo n.º 2
0
 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)
Exemplo n.º 3
0
 def test_lz_refs_empty_string(self):
     """ LZ FACTORISATION: Get reference factors from empty string """
     factors = refs("")
Exemplo n.º 4
0
 def test_lz_refs_empty_string(self):
     """ LZ FACTORISATION: Get reference factors from empty string """
     factors = refs("")