summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_threading.py
diff options
context:
space:
mode:
authorBrian Curtin <brian.curtin@gmail.com>2010-11-02 03:59:09 (GMT)
committerBrian Curtin <brian.curtin@gmail.com>2010-11-02 03:59:09 (GMT)
commitb68928bea70b0d9f33e0dc0a9c950291f8c65f15 (patch)
treed9ab005540c632693cec698807b4a56e84a2c398 /Lib/test/test_threading.py
parent21ebbb7d3918db6101c3c49ee04cac95d156003d (diff)
downloadcpython-b68928bea70b0d9f33e0dc0a9c950291f8c65f15.zip
cpython-b68928bea70b0d9f33e0dc0a9c950291f8c65f15.tar.gz
cpython-b68928bea70b0d9f33e0dc0a9c950291f8c65f15.tar.bz2
Clean up ResourceWarnings. Explictly close stdout from the subprocess.
Diffstat (limited to 'Lib/test/test_threading.py')
-rw-r--r--Lib/test/test_threading.py1
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")