Test that huffman codec works with empty freqs dict

This commit is contained in:
Matthew Honnibal 2016-10-23 16:27:45 +02:00
parent 15c9b59f0e
commit 99ff8b902f
1 changed files with 5 additions and 0 deletions

View File

@ -48,6 +48,11 @@ def test1():
py_codes = list(py_codes.items())
py_codes.sort()
assert codec.strings == [c for i, c in py_codes]
def test_empty():
codec = HuffmanCodec({})
assert codec.strings == []
def test_round_trip():