summaryrefslogtreecommitdiff
path: root/psutil/tests
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2017-10-29 21:14:57 +0100
committerGiampaolo Rodola <g.rodola@gmail.com>2017-10-29 21:14:57 +0100
commit35bd6fdfd752e61da41ca4325bc30bc85de1cbce (patch)
tree14ce5629173a4900ff1c09ae9b149e715720b988 /psutil/tests
parent4789fb72315d6ed102762673232189b4e42af5fb (diff)
downloadpsutil-35bd6fdfd752e61da41ca4325bc30bc85de1cbce.tar.gz
try to limit occasional appveyor failure
Diffstat (limited to 'psutil/tests')
-rwxr-xr-xpsutil/tests/test_process.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py
index 3eeaa7c3..b1498192 100755
--- a/psutil/tests/test_process.py
+++ b/psutil/tests/test_process.py
@@ -747,9 +747,19 @@ class TestProcess(unittest.TestCase):
# Test that name(), exe() and cmdline() correctly handle programs
# with funky chars such as spaces and ")", see:
# https://github.com/giampaolo/psutil/issues/628
+
+ def rm():
+ # Try to limit occasional failures on Appveyor:
+ # https://ci.appveyor.com/project/giampaolo/psutil/build/1350/
+ # job/lbo3bkju55le850n
+ try:
+ safe_rmpath(funky_path)
+ except OSError:
+ pass
+
funky_path = TESTFN + 'foo bar )'
create_exe(funky_path)
- self.addCleanup(safe_rmpath, funky_path)
+ self.addCleanup(rm)
cmdline = [funky_path, "-c",
"import time; [time.sleep(0.01) for x in range(3000)];"
"arg1", "arg2", "", "arg3", ""]