This commit is contained in:
Raymond Hettinger 2016-11-21 16:59:30 -08:00
commit 21fb9f1761
1 changed files with 1 additions and 4 deletions

View File

@ -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)