diff options
author | Brian Curtin <brian.curtin@gmail.com> | 2010-11-05 17:24:20 (GMT) |
---|---|---|
committer | Brian Curtin <brian.curtin@gmail.com> | 2010-11-05 17:24:20 (GMT) |
commit | 51c9b5152aca58066b7f35a9c6c419cadf270b6c (patch) | |
tree | b0dc8bf74a91843ed8f4b9f587938316eab20649 | |
parent | 7fe045ef00c5bf7c6ce00ec6e2d6c88a1b570979 (diff) | |
download | cpython-51c9b5152aca58066b7f35a9c6c419cadf270b6c.zip cpython-51c9b5152aca58066b7f35a9c6c419cadf270b6c.tar.gz cpython-51c9b5152aca58066b7f35a9c6c419cadf270b6c.tar.bz2 |
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
........
-rw-r--r-- | Lib/test/test_threading.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index 21b7a04..a06415d 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -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>") |