]> granicus.if.org Git - python/commitdiff
Merged revisions 86107 via svnmerge from
authorBrian Curtin <brian.curtin@gmail.com>
Tue, 2 Nov 2010 04:01:17 +0000 (04:01 +0000)
committerBrian Curtin <brian.curtin@gmail.com>
Tue, 2 Nov 2010 04:01:17 +0000 (04:01 +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 a4a6ed6ce0cab47afd5f06f10bb7b3235198d614..f691336c6064f215348f6ac33d2b0d0cc417d8af 100644 (file)
@@ -416,6 +416,7 @@ class ThreadJoinOnShutdown(unittest.TestCase):
         p = subprocess.Popen([sys.executable, "-c", script], stdout=subprocess.PIPE)
         rc = p.wait()
         data = p.stdout.read().decode().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")