forked from explosion/spaCy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_issue1769.py
61 lines (46 loc) · 1.77 KB
/
test_issue1769.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# coding: utf-8
from __future__ import unicode_literals
from ...util import get_lang_class
from ...attrs import LIKE_NUM
import pytest
@pytest.mark.parametrize('word', ['eleven'])
def test_en_lex_attrs(word):
lang = get_lang_class('en')
like_num = lang.Defaults.lex_attr_getters[LIKE_NUM]
assert like_num(word) == like_num(word.upper())
@pytest.mark.slow
@pytest.mark.parametrize('word', ['elleve', 'første'])
def test_da_lex_attrs(word):
lang = get_lang_class('da')
like_num = lang.Defaults.lex_attr_getters[LIKE_NUM]
assert like_num(word) == like_num(word.upper())
@pytest.mark.slow
@pytest.mark.parametrize('word', ['onze', 'onzième'])
def test_fr_lex_attrs(word):
lang = get_lang_class('fr')
like_num = lang.Defaults.lex_attr_getters[LIKE_NUM]
assert like_num(word) == like_num(word.upper())
@pytest.mark.slow
@pytest.mark.parametrize('word', ['sebelas'])
def test_id_lex_attrs(word):
lang = get_lang_class('id')
like_num = lang.Defaults.lex_attr_getters[LIKE_NUM]
assert like_num(word) == like_num(word.upper())
@pytest.mark.slow
@pytest.mark.parametrize('word', ['elf', 'elfde'])
def test_nl_lex_attrs(word):
lang = get_lang_class('nl')
like_num = lang.Defaults.lex_attr_getters[LIKE_NUM]
assert like_num(word) == like_num(word.upper())
@pytest.mark.slow
@pytest.mark.parametrize('word', ['onze', 'quadragésimo'])
def test_pt_lex_attrs(word):
lang = get_lang_class('pt')
like_num = lang.Defaults.lex_attr_getters[LIKE_NUM]
assert like_num(word) == like_num(word.upper())
@pytest.mark.slow
@pytest.mark.parametrize('word', ['одиннадцать'])
def test_ru_lex_attrs(word):
lang = get_lang_class('ru')
like_num = lang.Defaults.lex_attr_getters[LIKE_NUM]
assert like_num(word) == like_num(word.upper())