From c4ac887917e4b5d97ff1d761c68a52722044213c Mon Sep 17 00:00:00 2001 From: Brian Curtin Date: Mon, 1 Nov 2010 14:00:33 +0000 Subject: Close subprocess pipes to clear ResourceWarning messages in debug mode. --- Lib/test/script_helper.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Lib/test/script_helper.py') diff --git a/Lib/test/script_helper.py b/Lib/test/script_helper.py index f40a676c7ac..4cadcf71967 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( -- cgit v1.2.3