[pypy-commit] pypy py3k: Port gc.collect()s from 2.7's test_tempfile.

Manuel Jacob noreply at buildbot.pypy.org
Sun Feb 17 23:07:29 CET 2013


Author: Manuel Jacob
Branch: py3k
Changeset: r61367:68ca8b45806c
Date: 2013-02-16 19:06 +0100
http://bitbucket.org/pypy/pypy/changeset/68ca8b45806c/

Log:	Port gc.collect()s from 2.7's test_tempfile.

diff --git a/lib-python/3.2/test/test_tempfile.py b/lib-python/3.2/test/test_tempfile.py
--- a/lib-python/3.2/test/test_tempfile.py
+++ b/lib-python/3.2/test/test_tempfile.py
@@ -285,6 +285,7 @@
         dir = tempfile.mkdtemp()
         try:
             self.do_create(dir=dir).write(b"blat")
+            support.gc_collect()
         finally:
             os.rmdir(dir)
 
@@ -575,12 +576,15 @@
         self.do_create(suf="b")
         self.do_create(pre="a", suf="b")
         self.do_create(pre="aa", suf=".txt")
+        support.gc_collect()
 
     def test_many(self):
         # mktemp can choose many usable file names (stochastic)
         extant = list(range(TEST_FILES))
         for i in extant:
             extant[i] = self.do_create(pre="aa")
+        del extant
+        support.gc_collect()
 
 ##     def test_warning(self):
 ##         # mktemp issues a warning when used


More information about the pypy-commit mailing list