示例#1
0
 def f(n):
     if n == 0:
         return -1
     else:
         u = unicodedb_5_2_0.lookup("GOTHIC LETTER FAIHU")
         return u
示例#2
0
 def test_differences(self):
     assert unicodedb_5_2_0.name(9187) == 'BENZENE RING WITH CIRCLE'
     assert unicodedb_5_2_0.lookup('BENZENE RING WITH CIRCLE') == 9187
     raises(KeyError, unicodedb_3_2_0.lookup, 'BENZENE RING WITH CIRCLE')
     raises(KeyError, unicodedb_3_2_0.name, 9187)
示例#3
0
 def test_random_charnames(self):
     for chr, name in self.charlist:
         assert unicodedb_5_2_0.name(ord(chr)) == name
         assert unicodedb_5_2_0.lookup(name) == ord(chr)
 def f(n):
     if n == 0:
         return -1
     else:
         u = unicodedb_5_2_0.lookup("GOTHIC LETTER FAIHU")
         return u
 def test_differences(self):
     assert unicodedb_5_2_0.name(9187) == 'BENZENE RING WITH CIRCLE'
     assert unicodedb_5_2_0.lookup('BENZENE RING WITH CIRCLE') == 9187
     raises(KeyError, unicodedb_3_2_0.lookup, 'BENZENE RING WITH CIRCLE')
     raises(KeyError, unicodedb_3_2_0.name, 9187)
 def test_random_charnames(self):
     for chr, name in self.charlist:
         assert unicodedb_5_2_0.name(ord(chr)) == name
         assert unicodedb_5_2_0.lookup(name) == ord(chr)