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__())
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__())