mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Test Issue #588: Matcher accepts invalid, empty patterns.
This commit is contained in:
parent
59a30325ba
commit
72b9bd57ec
10
spacy/tests/regression/test_issue588.py
Normal file
10
spacy/tests/regression/test_issue588.py
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
import pytest
|
||||||
|
from ...vocab import Vocab
|
||||||
|
from ...tokens import Doc
|
||||||
|
from ...matcher import Matcher
|
||||||
|
|
||||||
|
|
||||||
|
def test_issue588():
|
||||||
|
matcher = Matcher(Vocab())
|
||||||
|
with pytest.raises(ValueError):
|
||||||
|
matcher.add(entity_key='1', label='TEST', attrs={}, specs=[[]])
|
Loading…
Reference in New Issue
Block a user