From 8e26a2861660eaf9dbc92e38c893ede9514909c2 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Sat, 7 Nov 2015 19:10:56 +1100 Subject: [PATCH] * Mark tests that require models --- spacy/tests/spans/test_merge.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/spacy/tests/spans/test_merge.py b/spacy/tests/spans/test_merge.py index 406809626..ddcf81fdd 100644 --- a/spacy/tests/spans/test_merge.py +++ b/spacy/tests/spans/test_merge.py @@ -1,6 +1,7 @@ from __future__ import unicode_literals import pytest +@pytest.mark.models def test_merge_tokens(EN): tokens = EN(u'Los Angeles start.') assert len(tokens) == 4 @@ -12,6 +13,7 @@ def test_merge_tokens(EN): assert tokens[0].head.orth_ == 'start' +@pytest.mark.models def test_merge_heads(EN): tokens = EN(u'I found a pilates class near work.') assert len(tokens) == 8 @@ -26,6 +28,7 @@ def test_merge_heads(EN): assert tokens[5].head.i == 4 +@pytest.mark.models def test_issue_54(EN): text = u'Talks given by women had a slightly higher number of questions asked (3.2$\pm$0.2) than talks given by men (2.6$\pm$0.1).' tokens = EN(text) @@ -44,6 +47,7 @@ def test_np_merges(EN): merged = tokens.merge(start, end, label, lemma, label) assert merged != None, (start, end, label, lemma) +@pytest.mark.models def test_entity_merge(EN): tokens = EN(u'Stewart Lee is a stand up comedian who lives in England and loves Joe Pasquale.\n') assert(len(tokens) == 17) @@ -53,6 +57,7 @@ def test_entity_merge(EN): # check looping is ok assert(len(tokens) == 15) +@pytest.mark.models def test_sentence_update_after_merge(EN): tokens = EN(u'Stewart Lee is a stand up comedian. He lives in England and loves Joe Pasquale.') sent1, sent2 = list(tokens.sents) @@ -65,6 +70,7 @@ def test_sentence_update_after_merge(EN): assert(len(sent1) == init_len - 1) assert(len(sent2) == init_len2 - 1) +@pytest.mark.models def test_subtree_size_check(EN): tokens = EN(u'Stewart Lee is a stand up comedian who lives in England and loves Joe Pasquale') sent1 = list(tokens.sents)[0]