From cc4c335e14ee1a3b7763fc6dc37074babc5e85f4 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 18 Jan 2016 17:00:11 +0100 Subject: [PATCH] * Set heads for test_merge_tokens, to make the test run without models --- spacy/tests/spans/test_merge.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spacy/tests/spans/test_merge.py b/spacy/tests/spans/test_merge.py index ea0b573f2..9b792d80b 100644 --- a/spacy/tests/spans/test_merge.py +++ b/spacy/tests/spans/test_merge.py @@ -1,9 +1,12 @@ from __future__ import unicode_literals +from spacy.attrs import HEAD import pytest +import numpy + -@pytest.mark.models def test_merge_tokens(EN): tokens = EN(u'Los Angeles start.') + tokens.from_array([HEAD], numpy.asarray([[1, 1, 0, -1]], dtype='int32').T) assert len(tokens) == 4 assert tokens[0].head.orth_ == 'Angeles' assert tokens[1].head.orth_ == 'start'