Fix pickle tests

This commit is contained in:
Matthew Honnibal 2018-12-06 20:46:36 +01:00
parent e619f45287
commit bb3304a4f1

View File

@ -29,8 +29,8 @@ def test_pickle_vocab(text1, text2):
lex2 = vocab[text2]
assert lex1.norm_ == text1[:-1]
assert lex2.norm_ == text2[:-1]
data = pickle.dumps(vocab)
unpickled = pickle.loads(data)
data = srsly.pickle_dumps(vocab)
unpickled = srsly.pickle_loads(data)
assert unpickled[text1].orth == lex1.orth
assert unpickled[text2].orth == lex2.orth
assert unpickled[text1].norm == lex1.norm