summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2017-11-24 08:26:41 +0100
committerGiampaolo Rodola <g.rodola@gmail.com>2017-11-24 08:26:41 +0100
commit71c4f5683460e110693c976b21b06ab4034ae8a3 (patch)
tree73d973270372965d722c8ed731216208557a5c65
parentd108baf4a27f0f3b115aae5e6109eaf109302bc3 (diff)
downloadpsutil-71c4f5683460e110693c976b21b06ab4034ae8a3.tar.gz
fix travis failure https://travis-ci.org/giampaolo/psutil/jobs/306424509
-rwxr-xr-xpsutil/tests/test_posix.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/psutil/tests/test_posix.py b/psutil/tests/test_posix.py
index ac68b8d3..0c3f6434 100755
--- a/psutil/tests/test_posix.py
+++ b/psutil/tests/test_posix.py
@@ -10,6 +10,7 @@
import datetime
import errno
import os
+import re
import subprocess
import sys
import time
@@ -152,6 +153,9 @@ class TestProcess(unittest.TestCase):
# remove path if there is any, from the command
name_ps = os.path.basename(name_ps).lower()
name_psutil = psutil.Process(self.pid).name().lower()
+ # ...because of how we calculate PYTHON_EXE; on OSX this may
+ # be "pythonX.Y".
+ name_psutil = re.sub(r"\d.\d", "", name_psutil)
self.assertEqual(name_ps, name_psutil)
def test_name_long(self):