summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_random.py
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 /Lib/test/test_random.py
parent518e6ee98b6d5a231ff9fcc603a92d15e962ba19 (diff)
parenta6edea530bb9f3a9ff6234f443ea5d00428a7635 (diff)
downloadcpython-29f8cb64e64cbbb3e5da7b280b78d37b58719070.zip
cpython-29f8cb64e64cbbb3e5da7b280b78d37b58719070.tar.gz
cpython-29f8cb64e64cbbb3e5da7b280b78d37b58719070.tar.bz2
Issue #19588: Merge with 3.3
Diffstat (limited to 'Lib/test/test_random.py')
-rw-r--r--Lib/test/test_random.py12
1 files changed, 6 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):