示例#1
0
    def test_user_assign(self):
        assert raises(Exception, iso3166, 666)

        iso3166._known[666] = ('XX', 'XXX', 'Hell')

        assert iso3166(666).name == 'Hell'
示例#2
0
 def check_formal(arg, formal):
     assert iso3166(arg).formal == formal
示例#3
0
 def check_short(arg, short):
     assert iso3166(arg).short == short
示例#4
0
 def check_name(arg, name):
     assert iso3166(arg).name == name
示例#5
0
 def test_bool_coerce(self):
     assert bool(iso3166(34))
示例#6
0
 def test_ctor_equiv(self):
     assert set(iso3166(n) for n in ('WZ', 'WAZ', "Wazland")) == set((456,))