mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-26 01:04:34 +03:00
Unit test for Issue 3879 (#4153)
* failing unit test for Issue #3879 * mark test as failing
This commit is contained in:
parent
86cd7f0efd
commit
68ee0384fd
21
spacy/tests/regression/test_issue3879.py
Normal file
21
spacy/tests/regression/test_issue3879.py
Normal file
|
@ -0,0 +1,21 @@
|
|||
# coding: utf8
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import pytest
|
||||
from spacy.lang.en import English
|
||||
from spacy.matcher import Matcher
|
||||
|
||||
|
||||
@pytest.mark.xfail
|
||||
def test_issue3879(en_vocab):
|
||||
nlp = English()
|
||||
text = "This is a test."
|
||||
doc = nlp(text)
|
||||
assert len(doc) == 5
|
||||
|
||||
pattern = [{"ORTH": "This", "OP": "?"}, {"OP": "?"}, {"ORTH": "test"}]
|
||||
matcher = Matcher(nlp.vocab)
|
||||
matcher.add("rule", None, pattern)
|
||||
matches = matcher(doc)
|
||||
|
||||
assert len(matches) == 2 # fails because of a FP match 'is a test'
|
Loading…
Reference in New Issue
Block a user