Skip to content

Commit

Permalink
try to stabilize pyexe 4
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Dec 19, 2024
1 parent aa166e9 commit b354526
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion psutil/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,9 @@ def attempt(exe):
exe = os.path.realpath(exe)
try:
subprocess.check_call(
[exe, "-V"], stdout=subprocess.PIPE, stderr=subprocess.PIPE
[exe, "-c import psutil"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
)
except subprocess.CalledProcessError:
return None
Expand Down
2 changes: 0 additions & 2 deletions psutil/tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
from psutil.tests import HAS_SENSORS_FANS
from psutil.tests import HAS_SENSORS_TEMPERATURES
from psutil.tests import PYTHON_EXE
from psutil.tests import PYTHON_EXE_ENV
from psutil.tests import QEMU_USER
from psutil.tests import SCRIPTS_DIR
from psutil.tests import PsutilTestCase
Expand Down Expand Up @@ -931,7 +930,6 @@ class TestScripts(PsutilTestCase):

@staticmethod
def assert_stdout(exe, *args, **kwargs):
kwargs.setdefault("env", PYTHON_EXE_ENV)
exe = '%s' % os.path.join(SCRIPTS_DIR, exe)
cmd = [PYTHON_EXE, exe]
for arg in args:
Expand Down

0 comments on commit b354526

Please sign in to comment.