Test Issue #588: Matcher accepts invalid, empty patterns.

This commit is contained in:
Matthew Honnibal 2016-11-03 00:09:35 +01:00
parent 59a30325ba
commit 72b9bd57ec
1 changed files with 10 additions and 0 deletions

View 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=[[]])