spaCy/spacy/tests/matcher
Madeesh Kannan d1760ebe02
Better handling of unexpected types in SetPredicate (#11312)
* `Matcher`: Better type checking of values in `SetPredicate`
`SetPredicate`: Emit warning and return `False` on unexpected value types

* Rename `value_type_mismatch` variable

* Inline warning

* Remove unexpected type warning from `_SetPredicate`

* Ensure that `str` values are not interpreted as sequences
Check elements of sequence values for convertibility to `str` or `int`

* Add more `INTERSECT` and `IN` test cases

* Test for inputs with multiple characters

* Return `False` early instead of using a boolean flag

* Remove superfluous `int` check, parentheses

* Apply suggestions from code review

Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>

* Appy suggestions from code review

* Clarify test comment

Co-authored-by: Adriane Boyd <adrianeboyd@gmail.com>
2022-09-02 09:09:48 +02:00
..
__init__.py Revert #4334 2019-09-29 17:32:12 +02:00
test_dependency_matcher.py add additional REL_OP (#10371) 2022-07-27 13:16:44 +02:00
test_matcher_api.py Better handling of unexpected types in SetPredicate (#11312) 2022-09-02 09:09:48 +02:00
test_matcher_logic.py Addition of min_max quantifier in matcher {n,m} (#10981) 2022-06-30 11:01:58 +02:00
test_pattern_validation.py Addition of min_max quantifier in matcher {n,m} (#10981) 2022-06-30 11:01:58 +02:00
test_phrase_matcher.py Clean up warnings in the test suite (#11331) 2022-08-22 12:04:30 +02:00