Mercurial > cpython-lru_cache-weakref
changeset 87597:c65882d79c5f 3.3
Issue #19588: Fixed tests in test_random that were silently skipped most
of the time. Patch by Julian Gindi.
| author | Zachary Ware <zachary.ware@gmail.com> |
|---|---|
| date | Tue, 26 Nov 2013 14:50:10 -0600 |
| parents | 8662734296a0 |
| children | 28ec217ce510 b8d606c62d68 |
| files | Lib/test/test_random.py Misc/ACKS Misc/NEWS |
| diffstat | 3 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/Lib/test/test_random.py Tue Nov 26 20:28:29 2013 +0000 +++ b/Lib/test/test_random.py Tue Nov 26 14:50:10 2013 -0600 @@ -194,10 +194,10 @@ 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_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):
--- a/Misc/ACKS Tue Nov 26 20:28:29 2013 +0000 +++ b/Misc/ACKS Tue Nov 26 14:50:10 2013 -0600 @@ -435,6 +435,7 @@ Jonathan Giddy Johannes Gijsbers Michael Gilfix +Julian Gindi Yannick Gingras Matt Giuca Wim Glenn
--- a/Misc/NEWS Tue Nov 26 20:28:29 2013 +0000 +++ b/Misc/NEWS Tue Nov 26 14:50:10 2013 -0600 @@ -65,6 +65,9 @@ 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.
