diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2016-08-29 23:20:16 +0200 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2016-09-02 10:10:55 +0200 |
commit | b831444bee734537daeaffd1455eb88663ee3763 (patch) | |
tree | 5dbcba710026edce886a62a722789391281393e4 /numpy/distutils/tests/test_system_info.py | |
parent | 2e86117d7ba2b4b0308b05a67b922f6db19a7c02 (diff) | |
download | numpy-b831444bee734537daeaffd1455eb88663ee3763.tar.gz |
MAINT: Close some filehandlers and PIPEs after being done
The PIPE in the tests caused a ResourceWarning during testing in
python 3.
Diffstat (limited to 'numpy/distutils/tests/test_system_info.py')
-rw-r--r-- | numpy/distutils/tests/test_system_info.py | 4 |
1 files changed, 3 insertions, 1 deletions
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 |