mirror of
https://github.com/explosion/spaCy.git
synced 2024-11-14 21:57:15 +03:00
db55577c45
* Remove unicode declarations * Remove Python 3.5 and 2.7 from CI * Don't require pathlib * Replace compat helpers * Remove OrderedDict * Use f-strings * Set Cython compiler language level * Fix typo * Re-add OrderedDict for Table * Update setup.cfg * Revert CONTRIBUTING.md * Revert lookups.md * Revert top-level.md * Small adjustments and docs [ci skip]
15 lines
458 B
Python
15 lines
458 B
Python
import pytest
|
|
from spacy.tokens import Doc, Token
|
|
from spacy.matcher import Matcher
|
|
|
|
|
|
@pytest.mark.xfail
|
|
def test_issue3555(en_vocab):
|
|
"""Test that custom extensions with default None don't break matcher."""
|
|
Token.set_extension("issue3555", default=None)
|
|
matcher = Matcher(en_vocab)
|
|
pattern = [{"LEMMA": "have"}, {"_": {"issue3555": True}}]
|
|
matcher.add("TEST", [pattern])
|
|
doc = Doc(en_vocab, words=["have", "apple"])
|
|
matcher(doc)
|