mirror of
https://github.com/python/cpython.git
synced 2025-09-17 14:16:02 +00:00
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:
parent
7fe045ef00
commit
51c9b5152a
1 changed files with 4 additions and 0 deletions
|
@ -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>")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue