[Python-checkins] cpython (3.6): Issue #26163: Disable periodically failing test which was overly demanding of

raymond.hettinger python-checkins at python.org
Mon Nov 21 19:59:36 EST 2016


https://hg.python.org/cpython/rev/e0f0211d314d
changeset:   105321:e0f0211d314d
branch:      3.6
parent:      105319:ecc6f7940e02
user:        Raymond Hettinger <python at rcn.com>
date:        Mon Nov 21 16:59:04 2016 -0800
summary:
  Issue #26163:  Disable periodically failing test which was overly demanding of the frozenset hash function effectiveness

files:
  Lib/test/test_set.py |  5 +----
  1 files changed, 1 insertions(+), 4 deletions(-)


diff --git a/Lib/test/test_set.py b/Lib/test/test_set.py
--- a/Lib/test/test_set.py
+++ b/Lib/test/test_set.py
@@ -730,9 +730,6 @@
             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 @@
         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)
 

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list