summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2016-10-19 10:31:55 -0600
committerCharles Harris <charlesr.harris@gmail.com>2016-10-19 10:31:55 -0600
commit8798f8df39ca0a9f0391ffc349431e1a93b97d38 (patch)
treef1a71f395294668f09646303ba1359e287900dbc
parent6da5f00fff528354d3676617b91b024007e62ecd (diff)
downloadnumpy-8798f8df39ca0a9f0391ffc349431e1a93b97d38.tar.gz
MAINT: Fix ResourceWarning new in Python 3.6.
In Python 2.6 the process destructor emits a ResourceWarning if the process has not terminated when destruction occurs. Fix by calling the wait method before return. The Popen class may be used as a context manager in Python 3.2+, unfortunately that does not include 2.7.
-rw-r--r--numpy/distutils/tests/test_system_info.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/numpy/distutils/tests/test_system_info.py b/numpy/distutils/tests/test_system_info.py
index 54975cae5..e0a205b10 100644
--- a/numpy/distutils/tests/test_system_info.py
+++ b/numpy/distutils/tests/test_system_info.py
@@ -72,6 +72,7 @@ def have_compiler():
p = Popen(cmd, stdout=PIPE, stderr=PIPE)
p.stdout.close()
p.stderr.close()
+ p.wait()
except OSError:
return False
return True