summaryrefslogtreecommitdiffstats
path: root/Lib/test/script_helper.py
diff options
context:
space:
mode:
authorBrian Curtin <brian.curtin@gmail.com>2010-11-01 14:00:33 (GMT)
committerBrian Curtin <brian.curtin@gmail.com>2010-11-01 14:00:33 (GMT)
commitc4ac887917e4b5d97ff1d761c68a52722044213c (patch)
treedba9595189d846f3e6ac44bfa47669f5d6ae3ae7 /Lib/test/script_helper.py
parent1f1c247adb974fe7f6ed0fa106884a95d031d622 (diff)
downloadcpython-c4ac887917e4b5d97ff1d761c68a52722044213c.zip
cpython-c4ac887917e4b5d97ff1d761c68a52722044213c.tar.gz
cpython-c4ac887917e4b5d97ff1d761c68a52722044213c.tar.bz2
Close subprocess pipes to clear ResourceWarning messages in debug mode.
Diffstat (limited to 'Lib/test/script_helper.py')
-rw-r--r--Lib/test/script_helper.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/script_helper.py b/Lib/test/script_helper.py
index f40a676..4cadcf7 100644
--- a/Lib/test/script_helper.py
+++ b/Lib/test/script_helper.py
@@ -24,6 +24,8 @@ def _assert_python(expected_success, *args):
out, err = p.communicate()
finally:
subprocess._cleanup()
+ p.stdout.close()
+ p.stderr.close()
rc = p.returncode
if (rc and expected_success) or (not rc and not expected_success):
raise AssertionError(