summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2013-11-26 20:54:21 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2013-11-26 20:54:21 (GMT)
commit29f8cb64e64cbbb3e5da7b280b78d37b58719070 (patch)
tree046fb347769fbf383cca37f4c019cc5ced5ccf09
parent518e6ee98b6d5a231ff9fcc603a92d15e962ba19 (diff)
parenta6edea530bb9f3a9ff6234f443ea5d00428a7635 (diff)
downloadcpython-29f8cb64e64cbbb3e5da7b280b78d37b58719070.zip
cpython-29f8cb64e64cbbb3e5da7b280b78d37b58719070.tar.gz
cpython-29f8cb64e64cbbb3e5da7b280b78d37b58719070.tar.bz2
Issue #19588: Merge with 3.3
-rw-r--r--Lib/test/test_random.py12
-rw-r--r--Misc/ACKS1
-rw-r--r--Misc/NEWS6
3 files changed, 13 insertions, 6 deletions
diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py
index 49a3f7b..7d1a53a 100644
--- a/Lib/test/test_random.py
+++ b/Lib/test/test_random.py
@@ -240,10 +240,10 @@ class SystemRandom_TestBasicOps(TestBasicOps, unittest.TestCase):
def test_bigrand_ranges(self):
for i in [40,80, 160, 200, 211, 250, 375, 512, 550]:
- start = self.gen.randrange(2 ** i)
- stop = self.gen.randrange(2 ** (i-2))
+ start = self.gen.randrange(2 ** (i-2))
+ stop = self.gen.randrange(2 ** i)
if stop <= start:
- return
+ continue
self.assertTrue(start <= self.gen.randrange(start, stop) < stop)
def test_rangelimits(self):
@@ -432,10 +432,10 @@ class MersenneTwister_TestBasicOps(TestBasicOps, unittest.TestCase):
def test_bigrand_ranges(self):
for i in [40,80, 160, 200, 211, 250, 375, 512, 550]:
- start = self.gen.randrange(2 ** i)
- stop = self.gen.randrange(2 ** (i-2))
+ start = self.gen.randrange(2 ** (i-2))
+ stop = self.gen.randrange(2 ** i)
if stop <= start:
- return
+ continue
self.assertTrue(start <= self.gen.randrange(start, stop) < stop)
def test_rangelimits(self):
diff --git a/Misc/ACKS b/Misc/ACKS
index 8c2aa4d..36cbdd7 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -449,6 +449,7 @@ Dinu Gherman
Jonathan Giddy
Johannes Gijsbers
Michael Gilfix
+Julian Gindi
Yannick Gingras
Matt Giuca
Wim Glenn
diff --git a/Misc/NEWS b/Misc/NEWS
index a3f3309..28382f1 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -21,6 +21,12 @@ Library
- Issue #19545: Avoid chained exceptions while passing stray % to
time.strptime(). Initial patch by Claudiu Popa.
+Tests
+-----
+
+- Issue #19588: Fixed tests in test_random that were silently skipped most
+ of the time. Patch by Julian Gindi.
+
What's New in Python 3.4.0 Beta 1?
==================================