mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #26163: Disable periodically failing test which was overly demanding of the frozenset hash function effectiveness
This commit is contained in:
parent
6b3481c4ed
commit
4e17e04237
1 changed files with 1 additions and 4 deletions
|
@ -730,9 +730,6 @@ class TestFrozenSet(TestJointOps, unittest.TestCase):
|
|||
addhashvalue(hash(frozenset([e for e, m in elemmasks if m&i])))
|
||||
self.assertEqual(len(hashvalues), 2**n)
|
||||
|
||||
def letter_range(n):
|
||||
return string.ascii_letters[:n]
|
||||
|
||||
def zf_range(n):
|
||||
# https://en.wikipedia.org/wiki/Set-theoretic_definition_of_natural_numbers
|
||||
nums = [frozenset()]
|
||||
|
@ -748,7 +745,7 @@ class TestFrozenSet(TestJointOps, unittest.TestCase):
|
|||
for n in range(18):
|
||||
t = 2 ** n
|
||||
mask = t - 1
|
||||
for nums in (range, letter_range, zf_range):
|
||||
for nums in (range, zf_range):
|
||||
u = len({h & mask for h in map(hash, powerset(nums(n)))})
|
||||
self.assertGreater(4*u, t)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue