Lines Matching refs:hash
2 # iff a==b then hash(a)==hash(b)
4 # Also test that hash implementations are inherited as expected
54 # the hash values are not all the same.
55 hashed = list(map(hash, objlist))
82 # The hash function for bytes-like objects shouldn't have
89 self.assertEqual(hash(aligned), hash(unaligned))
129 self.assertEqual(hash(obj), _default_hash(obj))
133 self.assertEqual(hash(obj), _FIXED_HASH_VALUE)
137 self.assertRaises(TypeError, hash, obj)
167 self.assertEqual(hash(obj), _default_hash(obj))
175 return 'print(hash(eval(%a)))' % repr_
267 # PYTHONHASHSEED=0 disables the randomized hash
278 # test a fixed seed for the randomized hash
299 self.assertEqual(hash(""), 0)
315 self.assertEqual(hash(b""), 0)
324 self.assertEqual(hash(memoryview(b"")), 0)
328 return 'import datetime; print(hash(%s))' % repr_
343 # check for hash collision
351 h = hash(prefix + chr(c))