示例#1
0
 def test_char_range(self):
     char = Char(0x002A)
     range_char = RangeChar(0x002A, 0x002A, 0x002B)
     self.assertEqual(char, range_char)
     self.assertEqual(char.__hash__(), range_char.__hash__())
示例#2
0
 def test_hash_char(self):
     c1 = Char(0x002A)
     c2 = Char(0x002A)
     c3 = Char(0x002B)
     self.assertEqual(c1.__hash__(), c2.__hash__())
     self.assertNotEqual(c1.__hash__(), c3.__hash__())