def test_build_codebook_it_should_initialize_data_of_left_in_codebook( self): left = Huffman(1, 'a') huffman = Huffman(2, 'ab', left) huffman.build_codebook() self.assertEqual(huffman.codebook['a'], '0')
def test_build_codebook_it_should_initialize_data_of_right_in_codebook( self): right = Huffman(1, 'b') huffman = Huffman(2, 'ab', None, right) huffman.build_codebook() self.assertEqual(huffman.codebook['b'], '1')