diff --git a/spacy/tests/vectors/test_vectors.py b/spacy/tests/vectors/test_vectors.py index ce183f9fd..a9eabc78d 100644 --- a/spacy/tests/vectors/test_vectors.py +++ b/spacy/tests/vectors/test_vectors.py @@ -3,6 +3,7 @@ from __future__ import unicode_literals from ...vectors import Vectors from ...tokenizer import Tokenizer +from ...strings import hash_string from ..util import add_vecs_to_vocab, get_doc import numpy @@ -45,6 +46,7 @@ def test_init_vectors_with_shape(strings): def test_get_vector(strings, data): v = Vectors(data=data) + strings = [hash_string(s) for s in strings] for i, string in enumerate(strings): v.add(string, row=i) assert list(v[strings[0]]) == list(data[0]) @@ -55,6 +57,7 @@ def test_get_vector(strings, data): def test_set_vector(strings, data): orig = data.copy() v = Vectors(data=data) + strings = [hash_string(s) for s in strings] for i, string in enumerate(strings): v.add(string, row=i) assert list(v[strings[0]]) == list(orig[0])