Start testing morphology class

This commit is contained in:
Matthew Honnibal 2018-09-25 20:38:08 +02:00
parent 4b7e772f5d
commit 9998d9b9ff
2 changed files with 25 additions and 0 deletions

View File

View File

@ -0,0 +1,25 @@
from __future__ import unicode_literals
import pytest
from ...morphology import Morphology
from ...strings import StringStore
from ...lemmatizer import Lemmatizer
from ...symbols import *
@pytest.fixture
def morphology():
return Morphology(StringStore(), {}, Lemmatizer())
def test_init(morphology):
pass
def test_add_tag_with_string_names(morphology):
morphology.add({"Case_gen", "Number_Sing"})
def test_add_tag_with_int_ids(morphology):
morphology.add({Case_gen, Number_sing})
def test_add_tag_with_mix_strings_and_ints(morphology):
morphology.add({PunctSide_ini, 'VerbType_aux'})