From c047498f87e9892f198316bc8e42e35608eda8df Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 1 Nov 2017 13:24:47 +0100 Subject: [PATCH] Fix vectors test --- spacy/tests/vectors/test_vectors.py | 3 +++ 1 file changed, 3 insertions(+) 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])