示例#1
0
 def test_casefolding(self):
     assert unicodedb_6_2_0.casefold_lookup(223) == [115, 115]
     assert unicodedb_6_2_0.casefold_lookup(976) == [946]
     assert unicodedb_5_2_0.casefold_lookup(42592) == None
     # 1010 has been remove between 3.2.0 and 5.2.0
     assert unicodedb_3_2_0.casefold_lookup(1010) == [963]
     assert unicodedb_5_2_0.casefold_lookup(1010) == None
     # 7838 has been added in 5.2.0
     assert unicodedb_3_2_0.casefold_lookup(7838) == None
     assert unicodedb_5_2_0.casefold_lookup(7838) == [115, 115]
     # Only lookup who cannot be resolved by `lower` are stored in database
     assert unicodedb_3_2_0.casefold_lookup(ord('E')) == None
示例#2
0
 def test_casefolding(self):
     assert unicodedb_6_2_0.casefold_lookup(223) == [115, 115]
     assert unicodedb_6_2_0.casefold_lookup(976) == [946]
     assert unicodedb_5_2_0.casefold_lookup(42592) == None
     # 1010 has been remove between 3.2.0 and 5.2.0
     assert unicodedb_3_2_0.casefold_lookup(1010) == [963]
     assert unicodedb_5_2_0.casefold_lookup(1010) == None
     # 7838 has been added in 5.2.0
     assert unicodedb_3_2_0.casefold_lookup(7838) == None
     assert unicodedb_5_2_0.casefold_lookup(7838) == [115, 115]
     # Only lookup who cannot be resolved by `lower` are stored in database
     assert unicodedb_3_2_0.casefold_lookup(ord('E')) == None