diff --git a/spacy/tests/serialize/test_huffman.py b/spacy/tests/serialize/test_huffman.py index 34623bd98..af881d66a 100644 --- a/spacy/tests/serialize/test_huffman.py +++ b/spacy/tests/serialize/test_huffman.py @@ -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():