Ejemplo n.º 1
0
def test_get_properties():
    assert list(get_properties(gt.symbols, 'nmsg').items()) == [
        ('pos', 'noun'),
        ('gender', 'masculine'),
        ('number', 'singular'),
        ('case', 'genitive'),
    ]
Ejemplo n.º 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')