コード例 #1
0
ファイル: test_languoids.py プロジェクト: zogamnuam/glottolog
def test_Glottocode():
    with pytest.raises(ValueError):
        Glottocode('a2')
コード例 #2
0
def test_Glottocode_validation():
    with pytest.raises(ValueError):
        Glottocode('a2')
コード例 #3
0
def test_Glottocode_ordering():
    assert sorted([Glottocode('abcd1235'),
                   Glottocode('abcd1234')])[0] == Glottocode('abcd1234')
    assert Glottocode('zzzz9999') > Glottocode('abcd1234')
    assert Glottocode('abcd1234') <= Glottocode('abcd1234')
コード例 #4
0
    def test_init(self):
        from pyglottolog.languoids import Glottocode

        with self.assertRaises(ValueError):
            Glottocode('a2')