コード例 #1
0
def test_languoids(api):
    assert len(list(api.languoids())) == 7
    assert len(list(api.languoids(maxlevel=api.languoid_levels.family))) == 2
    assert len(list(api.languoids(maxlevel=api.languoid_levels.language))) == 5
    assert len(api.languoids_by_code()) == 10
    assert api.languoids_by_code(nodes={}) == {}
    assert 'NOCODE_Family-name' in api.languoids_by_code()
コード例 #2
0
ファイル: test_api.py プロジェクト: bakyobagish/glottolog
def test_languoids(api):
    assert len(list(api.languoids())) == 4
    assert len(list(api.languoids(maxlevel=languoids.Level.family))) == 1
    assert len(list(api.languoids(maxlevel=languoids.Level.language))) == 3
    assert len(api.languoids_by_code()) == 7
    assert 'NOCODE_Family-name' in api.languoids_by_code()