예제 #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)
예제 #4
0
 def f(n):
     if n == 0:
         return -1
     else:
         u = unicodedb_5_2_0.lookup("GOTHIC LETTER FAIHU")
         return u
예제 #5
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)
예제 #6
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)