Fix test for Python 3

This commit is contained in:
Matthew Honnibal 2017-10-31 22:21:55 +01:00
parent c5799ecc7b
commit 92dc127569

View File

@ -35,6 +35,6 @@ def test_vocab_prune_vectors():
remap = vocab.prune_vectors(2)
assert list(remap.keys()) == [u'kitten']
neighbour, similarity = remap.values()[0]
neighbour, similarity = list(remap.values())[0]
assert neighbour == u'cat', remap
assert_allclose(similarity, cosine(data[0], data[2]), atol=1e-6)