[pypy-commit] pypy stdlib-2.7.8: call gc.collect before testing weakref
bdkearns
noreply at buildbot.pypy.org
Sun Aug 24 20:12:35 CEST 2014
Author: Brian Kearns <bdkearns at gmail.com>
Branch: stdlib-2.7.8
Changeset: r73033:e9d8dfeb3c6a
Date: 2014-08-24 14:11 -0400
http://bitbucket.org/pypy/pypy/changeset/e9d8dfeb3c6a/
Log: call gc.collect before testing weakref
diff --git a/lib-python/2.7/test/test_itertools.py b/lib-python/2.7/test/test_itertools.py
--- a/lib-python/2.7/test/test_itertools.py
+++ b/lib-python/2.7/test/test_itertools.py
@@ -808,6 +808,7 @@
it = islice(it, 1)
self.assertIsNotNone(wr())
list(it) # exhaust the iterator
+ test_support.gc_collect()
self.assertIsNone(wr())
def test_takewhile(self):
diff --git a/pypy/module/itertools/test/test_itertools.py b/pypy/module/itertools/test/test_itertools.py
--- a/pypy/module/itertools/test/test_itertools.py
+++ b/pypy/module/itertools/test/test_itertools.py
@@ -246,6 +246,7 @@
it = itertools.islice(it, *args)
assert wr() is not None
list(it) # exhaust the iterator
+ import gc; gc.collect()
assert wr() is None
raises(StopIteration, next, it)
More information about the pypy-commit
mailing list