Example #1
0
 def test_compress_no_repeats(self):
     """
     No Repeated ones
     """
     indices = [66, 67, 888]
     compression_dict = get_compression_dict(indices)
     expected = {}
     self.assertDictEqual(compression_dict, expected)
Example #2
0
 def test_compress1(self):
     indices = [19, 19, 0, 1, 2, 2, 3, 4, 4, 4, 9, 14, 14]
     compression_dict = get_compression_dict(indices)
     expected = {2: 0, 4: 1, 14: 2, 19: 3}
     self.assertDictEqual(compression_dict, expected)
Example #3
0
 def test_compress2(self):
     indices = [99, 14, 14, 88, 3, 3, 3, 12, 12]
     compression_dict = get_compression_dict(indices)
     expected = {3: 0, 12: 1, 14: 2}
     self.assertDictEqual(compression_dict, expected)