diff options
author | Brian Curtin <brian.curtin@gmail.com> | 2010-11-02 03:59:09 +0000 |
---|---|---|
committer | Brian Curtin <brian.curtin@gmail.com> | 2010-11-02 03:59:09 +0000 |
commit | e821220a1f1efe2b649068823523e6c65b4126f3 (patch) | |
tree | 688300f1cb1186cc8077445f975e6edce02c0cba /Lib/test/test_threading.py | |
parent | 5f6b08c1d6a424016568eeb5f1eaa5fe98ecc86c (diff) | |
download | cpython-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.py | 1 |
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") |