Skip to content

Commit

Permalink
add dirty workaround on CI
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Dec 18, 2023
1 parent 11599d8 commit eca6a9a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions psutil/tests/test_unicode.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@

import os
import shutil
import time
import traceback
import unittest
import warnings
Expand Down Expand Up @@ -193,6 +194,11 @@ def expect_exact_path_match(self):

def test_proc_exe(self):
subp = self.spawn_testproc(cmd=[self.funky_name])
# XXX: sometimes fail with ProcessLookupError: [Errno 3] assume
# no such process (originated from GetExitCodeProcess !=
# STILL_ACTIVE)
if WINDOWS and CI_TESTING:
time.sleep(.1)
p = psutil.Process(subp.pid)
exe = p.exe()
self.assertIsInstance(exe, str)
Expand All @@ -202,6 +208,11 @@ def test_proc_exe(self):

def test_proc_name(self):
subp = self.spawn_testproc(cmd=[self.funky_name])
# XXX: sometimes fail with ProcessLookupError: [Errno 3] assume
# no such process (originated from GetExitCodeProcess !=
# STILL_ACTIVE)
if WINDOWS and CI_TESTING:
time.sleep(.1)
name = psutil.Process(subp.pid).name()
self.assertIsInstance(name, str)
if self.expect_exact_path_match():
Expand Down

0 comments on commit eca6a9a

Please sign in to comment.