From b831444bee734537daeaffd1455eb88663ee3763 Mon Sep 17 00:00:00 2001 From: Sebastian Berg Date: Mon, 29 Aug 2016 23:20:16 +0200 Subject: MAINT: Close some filehandlers and PIPEs after being done The PIPE in the tests caused a ResourceWarning during testing in python 3. --- numpy/distutils/tests/test_system_info.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'numpy/distutils/tests/test_system_info.py') diff --git a/numpy/distutils/tests/test_system_info.py b/numpy/distutils/tests/test_system_info.py index 0f45cd79e..54975cae5 100644 --- a/numpy/distutils/tests/test_system_info.py +++ b/numpy/distutils/tests/test_system_info.py @@ -69,7 +69,9 @@ def have_compiler(): return False cmd = [compiler.cc] try: - Popen(cmd, stdout=PIPE, stderr=PIPE) + p = Popen(cmd, stdout=PIPE, stderr=PIPE) + p.stdout.close() + p.stderr.close() except OSError: return False return True -- cgit v1.2.1