def test_Glottocode(): with pytest.raises(ValueError): Glottocode('a2')
def test_Glottocode_validation(): with pytest.raises(ValueError): Glottocode('a2')
def test_Glottocode_ordering(): assert sorted([Glottocode('abcd1235'), Glottocode('abcd1234')])[0] == Glottocode('abcd1234') assert Glottocode('zzzz9999') > Glottocode('abcd1234') assert Glottocode('abcd1234') <= Glottocode('abcd1234')
def test_init(self): from pyglottolog.languoids import Glottocode with self.assertRaises(ValueError): Glottocode('a2')