mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
enable hash randomization by default
This commit is contained in:
parent
6ca5a4d49f
commit
c9f54cf512
9 changed files with 44 additions and 65 deletions
|
@ -159,8 +159,8 @@ class StringlikeHashRandomizationTests(HashRandomizationTests):
|
|||
else:
|
||||
known_hash_of_obj = -1600925533
|
||||
|
||||
# Randomization is disabled by default:
|
||||
self.assertEqual(self.get_hash(self.repr_), known_hash_of_obj)
|
||||
# Randomization is enabled by default:
|
||||
self.assertNotEqual(self.get_hash(self.repr_), known_hash_of_obj)
|
||||
|
||||
# It can also be disabled by setting the seed to 0:
|
||||
self.assertEqual(self.get_hash(self.repr_, seed=0), known_hash_of_obj)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue