Пример #1
0
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')