diff options
author | Brian Curtin <brian.curtin@gmail.com> | 2010-11-02 03:59:09 (GMT) |
---|---|---|
committer | Brian Curtin <brian.curtin@gmail.com> | 2010-11-02 03:59:09 (GMT) |
commit | b68928bea70b0d9f33e0dc0a9c950291f8c65f15 (patch) | |
tree | d9ab005540c632693cec698807b4a56e84a2c398 | |
parent | 21ebbb7d3918db6101c3c49ee04cac95d156003d (diff) | |
download | cpython-b68928bea70b0d9f33e0dc0a9c950291f8c65f15.zip cpython-b68928bea70b0d9f33e0dc0a9c950291f8c65f15.tar.gz cpython-b68928bea70b0d9f33e0dc0a9c950291f8c65f15.tar.bz2 |
Clean up ResourceWarnings. Explictly close stdout from the subprocess.
-rw-r--r-- | Lib/test/test_threading.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index a453ccc..784f95b 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -445,6 +445,7 @@ class ThreadJoinOnShutdown(BaseTestCase): 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") |