From 5f6f48e734ca150b2fe94783cd7b5e75419713f3 Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Fri, 20 Jan 2017 15:11:43 +0100 Subject: [PATCH] Add regression test for #759 --- spacy/tests/regression/test_issue759.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 spacy/tests/regression/test_issue759.py diff --git a/spacy/tests/regression/test_issue759.py b/spacy/tests/regression/test_issue759.py new file mode 100644 index 000000000..b7cf69f1a --- /dev/null +++ b/spacy/tests/regression/test_issue759.py @@ -0,0 +1,12 @@ +# coding: utf-8 +from __future__ import unicode_literals + +import pytest + + +@pytest.mark.parametrize('text,is_num', [("one", True), ("ten", True), + ("teneleven", False)]) +def test_issue759(en_tokenizer, text, is_num): + """Test that numbers are recognised correctly.""" + tokens = en_tokenizer(text) + assert tokens[0].like_num == is_num