mirror of https://github.com/explosion/spaCy.git
Update test for 850, making it work with matcher2
This commit is contained in:
parent
9bdfa5cd4f
commit
dcd8d89aef
|
@ -4,9 +4,9 @@ import pytest
|
|||
|
||||
from ...vocab import Vocab
|
||||
from ...tokens import Doc
|
||||
from ...matcher import Matcher
|
||||
from ...matcher2 import Matcher
|
||||
|
||||
@pytest.mark.xfail
|
||||
#@pytest.mark.xfail
|
||||
def test_issue1945():
|
||||
text = "a a a"
|
||||
matcher = Matcher(Vocab())
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
from __future__ import unicode_literals
|
||||
import pytest
|
||||
|
||||
from ...matcher import Matcher
|
||||
from ...matcher2 import Matcher
|
||||
from ...vocab import Vocab
|
||||
from ...attrs import LOWER
|
||||
from ...tokens import Doc
|
||||
|
@ -22,10 +22,9 @@ def test_basic_case():
|
|||
assert end == 4
|
||||
|
||||
|
||||
@pytest.mark.xfail
|
||||
def test_issue850():
|
||||
"""The problem here is that the variable-length pattern matches the
|
||||
succeeding token. We then don't handle the ambiguity correctly."""
|
||||
"""The variable-length pattern matches the
|
||||
succeeding token. Check we handle the ambiguity correctly."""
|
||||
matcher = Matcher(Vocab(
|
||||
lex_attr_getters={LOWER: lambda string: string.lower()}))
|
||||
IS_ANY_TOKEN = matcher.vocab.add_flag(lambda x: True)
|
||||
|
|
Loading…
Reference in New Issue