diff --git a/spacy/tests/vectors/test_vectors.py b/spacy/tests/vectors/test_vectors.py index 0e4464d93..798871edd 100644 --- a/spacy/tests/vectors/test_vectors.py +++ b/spacy/tests/vectors/test_vectors.py @@ -40,11 +40,15 @@ def test_init_vectors_with_data(strings, data): def test_init_vectors_with_width(strings): v = Vectors(strings, 3) + for string in strings: + v.add(string) assert v.shape == (len(strings), 3) def test_get_vector(strings, data): v = Vectors(strings, data) + for string in strings: + v.add(string) assert list(v[strings[0]]) == list(data[0]) assert list(v[strings[0]]) != list(data[1]) assert list(v[strings[1]]) != list(data[0]) @@ -53,6 +57,8 @@ def test_get_vector(strings, data): def test_set_vector(strings, data): orig = data.copy() v = Vectors(strings, data) + for string in strings: + v.add(string) assert list(v[strings[0]]) == list(orig[0]) assert list(v[strings[0]]) != list(orig[1]) v[strings[0]] = data[1]