예제 #1
0
def test_get_properties():
    assert list(get_properties(gt.symbols, 'nmsg').items()) == [
        ('pos', 'noun'),
        ('gender', 'masculine'),
        ('number', 'singular'),
        ('case', 'genitive'),
    ]
예제 #2
0
def test_get_properties_error():
    with pytest.raises(ValueError):
        get_properties(gt.symbols, '')

    with pytest.raises(ValueError):
        get_properties(gt.symbols, '?msg')

    with pytest.raises(ValueError):
        get_properties(gt.symbols, 'n')

    with pytest.raises(ValueError):
        get_properties(gt.symbols, 'n?sg')