def testHash(self):
    hmod = sys.hash_info.modulus
    hinf = sys.hash_info.inf
    self.assertEqual(hash(2.5), hash(F(5, 2)))
    self.assertEqual(hash((10 ** 50)), hash(F((10 ** 50))))
    self.assertNotEqual(hash(float((10 ** 23))), hash(F((10 ** 23))))
    self.assertEqual(hinf, hash(F(1, hmod)))
    self.assertEqual(hash(F((- 1))), F((- 1)).__hash__())
def testHash(self):
    hmod = sys.hash_info.modulus
    hinf = sys.hash_info.inf
    self.assertEqual(hash(2.5), hash(F(5, 2)))
    self.assertEqual(hash((10 ** 50)), hash(F((10 ** 50))))
    self.assertNotEqual(hash(float((10 ** 23))), hash(F((10 ** 23))))
    self.assertEqual(hinf, hash(F(1, hmod)))
    self.assertEqual(hash(F((- 1))), F((- 1)).__hash__())