]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 86107 via svnmerge from
authorBrian Curtin <brian.curtin@gmail.com>
Tue, 2 Nov 2010 04:04:37 +0000 (04:04 +0000)
committerBrian Curtin <brian.curtin@gmail.com>
Tue, 2 Nov 2010 04:04:37 +0000 (04:04 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86107 | brian.curtin | 2010-11-01 22:59:09 -0500 (Mon, 01 Nov 2010) | 2 lines

  Clean up ResourceWarnings. Explictly close stdout from the subprocess.
........

Lib/test/test_threading.py

index 5af74794c29b92cbaaeeed214fb4ed740b1806b7..21b7a04e2d08dd0902a88608e4c86958eaa0c24b 100644 (file)
@@ -428,6 +428,7 @@ class ThreadJoinOnShutdown(BaseTestCase):
         p = subprocess.Popen([sys.executable, "-c", script], stdout=subprocess.PIPE)
         rc = p.wait()
         data = p.stdout.read().replace('\r', '')
+        p.stdout.close()
         self.assertEqual(data, "end of main\nend of thread\n")
         self.assertFalse(rc == 2, "interpreter was blocked")
         self.assertTrue(rc == 0, "Unexpected error")