]> granicus.if.org Git - python/commitdiff
Merged revisions 85935-85936 via svnmerge from
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 31 Oct 2010 13:15:24 +0000 (13:15 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 31 Oct 2010 13:15:24 +0000 (13:15 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85935 | antoine.pitrou | 2010-10-29 21:34:45 +0200 (ven., 29 oct. 2010) | 4 lines

  Make a GC run before trying to clean up files left over by
  the latest test run.
........
  r85936 | antoine.pitrou | 2010-10-29 21:36:37 +0200 (ven., 29 oct. 2010) | 3 lines

  Fix typo
........

Lib/test/regrtest.py

index e1d3f7f7e341963f12da1ec415959ac011eca53a..92a3d11cea2c638f22df686047e0761787c43f53 100755 (executable)
@@ -923,6 +923,10 @@ def runtest_inner(test, verbose, quiet,
 def cleanup_test_droppings(testname, verbose):
     import shutil
     import stat
+    import gc
+
+    # First kill any dangling references to open files etc.
+    gc.collect()
 
     # Try to clean up junk commonly left behind.  While tests shouldn't leave
     # any files or directories behind, when a test fails that can be tedious