mirror of
https://github.com/python/cpython.git
synced 2026-01-04 14:32:21 +00:00
Issue #19588: Fixed tests in test_random that were silently skipped most
of the time. Patch by Julian Gindi.
This commit is contained in:
parent
a04f4e0374
commit
a6edea530b
3 changed files with 10 additions and 6 deletions
|
|
@ -194,10 +194,10 @@ def test_bigrand(self):
|
|||
|
||||
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):
|
||||
|
|
@ -357,10 +357,10 @@ def test_bigrand(self):
|
|||
|
||||
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):
|
||||
|
|
|
|||
|
|
@ -435,6 +435,7 @@ Dinu Gherman
|
|||
Jonathan Giddy
|
||||
Johannes Gijsbers
|
||||
Michael Gilfix
|
||||
Julian Gindi
|
||||
Yannick Gingras
|
||||
Matt Giuca
|
||||
Wim Glenn
|
||||
|
|
|
|||
|
|
@ -65,6 +65,9 @@ Library
|
|||
Tests
|
||||
-----
|
||||
|
||||
- Issue #19588: Fixed tests in test_random that were silently skipped most
|
||||
of the time. Patch by Julian Gindi.
|
||||
|
||||
- Issue #19596: Set untestable tests in test_importlib to None to avoid
|
||||
reporting success on empty tests.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue