mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
Update morphology tests
This commit is contained in:
parent
51a297f934
commit
d89a1a91ac
|
@ -13,13 +13,29 @@ def morphology():
|
|||
def test_init(morphology):
|
||||
pass
|
||||
|
||||
def test_add_tag_with_string_names(morphology):
|
||||
morphology.add({"Case_gen", "Number_Sing"})
|
||||
def test_add_morphology_with_string_names(morphology):
|
||||
morphology.add({"Case_gen", "Number_sing"})
|
||||
|
||||
def test_add_tag_with_int_ids(morphology):
|
||||
def test_add_morphology_with_int_ids(morphology):
|
||||
morphology.add({Case_gen, Number_sing})
|
||||
|
||||
def test_add_tag_with_mix_strings_and_ints(morphology):
|
||||
def test_add_morphology_with_mix_strings_and_ints(morphology):
|
||||
morphology.add({PunctSide_ini, 'VerbType_aux'})
|
||||
|
||||
|
||||
def test_morphology_tags_hash_distinctly(morphology):
|
||||
tag1 = morphology.add({PunctSide_ini, 'VerbType_aux'})
|
||||
tag2 = morphology.add({"Case_gen", 'Number_sing'})
|
||||
assert tag1 != tag2
|
||||
|
||||
def test_morphology_tags_hash_independent_of_order(morphology):
|
||||
tag1 = morphology.add({"Case_gen", 'Number_sing'})
|
||||
tag2 = morphology.add({"Number_sing", "Case_gen"})
|
||||
assert tag1 == tag2
|
||||
|
||||
def test_update_morphology_tag(morphology):
|
||||
tag1 = morphology.add({"Case_gen"})
|
||||
tag2 = morphology.update(tag1, {"Number_sing"})
|
||||
assert tag1 != tag2
|
||||
tag3 = morphology.add({"Number_sing", "Case_gen"})
|
||||
assert tag2 == tag3
|
||||
|
|
Loading…
Reference in New Issue
Block a user