Lines Matching refs:hash
12 # Constants related to the hash implementation; hash(x) is based
41 self.assertEqual(hash(x), hash(y),
50 # check that equal values hash equal
58 # the current hash is based on reduction modulo 2**n-1 for some
88 # check that floats hash equal to corresponding Fractions and Decimals
90 # floats that are distinct but numerically equal should hash the same
109 # complex numbers with zero imaginary part should hash equal to
121 # but equal values give the same hash
140 self.assertEqual(hash(F(1, _PyHASH_MODULUS)), _PyHASH_INF)
141 self.assertEqual(hash(F(-1, 3*_PyHASH_MODULUS)), -_PyHASH_INF)
142 self.assertEqual(hash(F(7*_PyHASH_MODULUS, 1)), 0)
143 self.assertEqual(hash(F(-_PyHASH_MODULUS, 1)), 0)
156 # __hash__ method to return hash(x) in order to ensure that
157 # hash(x) == hash(y). But hash(x) is not exactly equal to the
160 # equal to the invalid hash value -1. This internal
162 # hash(x) for any x.
166 return hash('halibut')