From 43ad250dd5c4a9731acf648a40b8218fc677df81 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Wed, 20 Sep 2017 21:54:49 +0200 Subject: [PATCH] Update matcher tests --- spacy/tests/test_matcher.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spacy/tests/test_matcher.py b/spacy/tests/test_matcher.py index 388aab03e..651707019 100644 --- a/spacy/tests/test_matcher.py +++ b/spacy/tests/test_matcher.py @@ -34,7 +34,6 @@ def test_matcher_from_api_docs(en_vocab): assert len(patterns[0]) -@pytest.mark.xfail def test_matcher_from_usage_docs(en_vocab): text = "Wow 😀 This is really cool! 😂 😂" doc = get_doc(en_vocab, words=text.split(' ')) @@ -46,7 +45,8 @@ def test_matcher_from_usage_docs(en_vocab): if doc.vocab.strings[match_id] == 'HAPPY': doc.sentiment += 0.1 span = doc[start : end] - token = span.merge(norm='happy emoji') + token = span.merge() + token.vocab[token.text].norm_ = 'happy emoji' matcher = Matcher(en_vocab) matcher.add('HAPPY', label_sentiment, *pos_patterns) @@ -98,7 +98,6 @@ def test_matcher_match_multi(matcher): (doc.vocab.strings['Java'], 5, 6)] -@pytest.mark.xfail def test_matcher_phrase_matcher(en_vocab): words = ["Google", "Now"] doc = get_doc(en_vocab, words)