Commit 97c6cb09 authored by Brian Curtin's avatar Brian Curtin

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
........
parent 1dae180d
......@@ -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>")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment