Author: Brian Kearns <[email protected]>
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)
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to