Merged revisions 86209 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86209 | brian.curtin | 2010-11-05 12:22:46 -0500 (Fri, 05 Nov 2010) | 2 lines

  Close subprocess pipes to clean up ResourceWarnings
........
This commit is contained in:
Brian Curtin 2010-11-05 17:24:20 +00:00
parent 7fe045ef00
commit 51c9b5152a

View file

@ -330,6 +330,8 @@ class ThreadTests(BaseTestCase):
"""],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
self.addCleanup(p.stdout.close)
self.addCleanup(p.stderr.close)
stdout, stderr = p.communicate()
rc = p.returncode
self.assertFalse(rc == 2, "interpreted was blocked")
@ -355,6 +357,8 @@ class ThreadTests(BaseTestCase):
"""],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
self.addCleanup(p.stdout.close)
self.addCleanup(p.stderr.close)
stdout, stderr = p.communicate()
self.assertEqual(stdout.strip(),
"Woke up, sleep function is: <built-in function sleep>")