From 5ee4d8c6416bf38c8d7cb3518b1669103f53d861 Mon Sep 17 00:00:00 2001 From: Matthew Honnibal Date: Mon, 1 Sep 2014 23:41:43 +0200 Subject: [PATCH] * Work on tests for flag features --- tests/test_flag_features.py | 56 ++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/tests/test_flag_features.py b/tests/test_flag_features.py index ab218da43..61c013e68 100644 --- a/tests/test_flag_features.py +++ b/tests/test_flag_features.py @@ -1,13 +1,13 @@ import pytest -from orth import is_alpha -from orth import is_digit -from orth import is_punct -from orth import is_space -from orth import is_ascii -from orth import is_upper -from orth import is_lower -from orth import is_title +from spacy.orth import is_alpha +from spacy.orth import is_digit +from spacy.orth import is_punct +from spacy.orth import is_space +from spacy.orth import is_ascii +from spacy.orth import is_upper +from spacy.orth import is_lower +from spacy.orth import is_title @pytest.fixture @@ -16,26 +16,26 @@ def words(): "!d", "\nd"] def test_is_alpha(words): - assert is_alpha(words[0]) == False - assert is_alpha(words[1]) == False - assert is_alpha(words[2]) == False - assert is_alpha(words[3]) == True - assert is_alpha(words[4]) == True - assert is_alpha(words[5]) == False - assert is_alpha(words[6]) == False - assert is_alpha(words[7]) == False - assert is_alpha(words[8]) == False - assert is_alpha(words[9]) == False + assert is_alpha(words[0], 0, {}, {}) == False + assert is_alpha(words[1], 0, {}, {}) == False + assert is_alpha(words[2], 0, {}, {}) == False + assert is_alpha(words[3], 0, {}, {}) == True + assert is_alpha(words[4], 0, {}, {}) == True + assert is_alpha(words[5], 0, {}, {}) == False + assert is_alpha(words[6], 0, {}, {}) == False + assert is_alpha(words[7], 0, {}, {}) == False + assert is_alpha(words[8], 0, {}, {}) == False + assert is_alpha(words[9], 0, {}, {}) == False def test_is_digit(words): - assert is_digit(words[0]) == False - assert is_digit(words[1]) == False - assert is_digit(words[2]) == False - assert is_digit(words[3]) == True - assert is_digit(words[4]) == True - assert is_digit(words[5]) == False - assert is_digit(words[6]) == False - assert is_digit(words[7]) == False - assert is_digit(words[8]) == False - assert is_digit(words[9]) == False + assert is_digit(words[0], 0, {}, {}) == True + assert is_digit(words[1], 0, {}, {}) == False + assert is_digit(words[2], 0, {}, {}) == False + assert is_digit(words[3], 0, {}, {}) == False + assert is_digit(words[4], 0, {}, {}) == False + assert is_digit(words[5], 0, {}, {}) == False + assert is_digit(words[6], 0, {}, {}) == False + assert is_digit(words[7], 0, {}, {}) == False + assert is_digit(words[8], 0, {}, {}) == False + assert is_digit(words[9], 0, {}, {}) == False