summaryrefslogtreecommitdiff
path: root/psutil/tests/test_posix.py
diff options
context:
space:
mode:
Diffstat (limited to 'psutil/tests/test_posix.py')
-rwxr-xr-xpsutil/tests/test_posix.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/psutil/tests/test_posix.py b/psutil/tests/test_posix.py
index ebbf7a6e..d8732230 100755
--- a/psutil/tests/test_posix.py
+++ b/psutil/tests/test_posix.py
@@ -271,6 +271,12 @@ class TestProcess(PsutilTestCase):
adjusted_ps_pathname = ps_pathname[:len(ps_pathname)]
self.assertEqual(ps_pathname, adjusted_ps_pathname)
+ # On macOS the official python installer exposes a python wrapper that
+ # executes a python executable hidden inside an application bundle inside
+ # the Python framework.
+ # There's a race condition between the ps call & the psutil call below
+ # depending on the completion of the execve call so let's retry on failure
+ @retry_on_failure()
def test_cmdline(self):
ps_cmdline = ps_args(self.pid)
psutil_cmdline = " ".join(psutil.Process(self.pid).cmdline())