Lines Matching refs:hash
962 hash(None)
963 self.assertEqual(hash(1), hash(1))
964 self.assertEqual(hash(1), hash(1.0))
965 hash('spam')
966 self.assertEqual(hash('spam'), hash(b'spam'))
967 hash((0,1,2,3))
969 hash(f)
970 self.assertRaises(TypeError, hash, [])
971 self.assertRaises(TypeError, hash, {})
972 # Bug 1536021: Allow hash to return long objects
976 self.assertEqual(type(hash(X())), int)
980 self.assertEqual(hash(Z(42)), hash(42))