summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2018-03-28 17:09:17 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2018-03-28 17:09:17 +0200
commit3544efc5db6131ea7dc9cd5c90c5db31f519a86d (patch)
tree6a2d8f90cc60526ada7887a246d656260d590a2c
parent043da3edd9484c30c84162d819b0bc60766738db (diff)
downloadpsutil-3544efc5db6131ea7dc9cd5c90c5db31f519a86d.tar.gz
fix appveyor failure, see https://ci.appveyor.com/project/giampaolo/psutil/build/job/6in5bk62ekiploys
-rw-r--r--appveyor.yml2
-rw-r--r--psutil/tests/__init__.py4
-rwxr-xr-xpsutil/tests/test_process.py4
3 files changed, 6 insertions, 4 deletions
diff --git a/appveyor.yml b/appveyor.yml
index 4cb69399..e1f6c355 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -70,7 +70,7 @@ install:
- "powershell .ci\\appveyor\\install.ps1"
# - ps: (new-object net.webclient).DownloadFile('https://raw.github.com/pypa/pip/master/contrib/get-pip.py', 'C:/get-pip.py')
- "%WITH_COMPILER% %PYTHON%/python.exe -m pip --version"
- - "%WITH_COMPILER% %PYTHON%/python.exe -m pip install --upgrade --user unittest2 ipaddress pypiwin32 wmi wheel"
+ - "%WITH_COMPILER% %PYTHON%/python.exe -m pip install --upgrade --user unittest2 ipaddress pypiwin32==220 wmi wheel"
- "%WITH_COMPILER% %PYTHON%/python.exe -m pip freeze"
- "%WITH_COMPILER% %PYTHON%/python.exe scripts/internal/winmake.py clean"
- "%WITH_COMPILER% %PYTHON%/python.exe setup.py build"
diff --git a/psutil/tests/__init__.py b/psutil/tests/__init__.py
index 537f7817..dcdbd4fa 100644
--- a/psutil/tests/__init__.py
+++ b/psutil/tests/__init__.py
@@ -482,7 +482,9 @@ def reap_children(recursive=False):
try:
subp.terminate()
except OSError as err:
- if err.errno != errno.ESRCH:
+ if WINDOWS and err.errno == 6: # "invalid handle"
+ pass
+ elif err.errno != errno.ESRCH:
raise
if subp.stdout:
subp.stdout.close()
diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py
index 33557b05..3411114a 100755
--- a/psutil/tests/test_process.py
+++ b/psutil/tests/test_process.py
@@ -1206,9 +1206,9 @@ class TestProcess(unittest.TestCase):
# Test that NoSuchProcess exception gets raised in case the
# process dies after we create the Process object.
# Example:
- # >>> proc = Process(1234)
+ # >>> proc = Process(1234)
# >>> time.sleep(2) # time-consuming task, process dies in meantime
- # >>> proc.name()
+ # >>> proc.name()
# Refers to Issue #15
sproc = get_test_subprocess()
p = psutil.Process(sproc.pid)