summaryrefslogtreecommitdiff
path: root/Lib/test/test_threading.py
diff options
context:
space:
mode:
authorBrian Curtin <brian.curtin@gmail.com>2010-11-02 03:59:09 +0000
committerBrian Curtin <brian.curtin@gmail.com>2010-11-02 03:59:09 +0000
commite821220a1f1efe2b649068823523e6c65b4126f3 (patch)
tree688300f1cb1186cc8077445f975e6edce02c0cba /Lib/test/test_threading.py
parent5f6b08c1d6a424016568eeb5f1eaa5fe98ecc86c (diff)
downloadcpython-e821220a1f1efe2b649068823523e6c65b4126f3.tar.gz
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 a453ccc490..784f95be9e 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")