summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2020-05-22 21:24:28 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2020-05-22 21:24:28 +0200
commit2f30c29b3d825b9f33cbd0028aafc9e1ae5919a1 (patch)
tree1ba2b4448480b2f55724cc4812712f4401661b53
parent5fb666761879f466f41810cdb3b31807aa3e8229 (diff)
downloadpsutil-2f30c29b3d825b9f33cbd0028aafc9e1ae5919a1.tar.gz
fix exe
-rwxr-xr-xpsutil/tests/test_process.py6
-rwxr-xr-xpsutil/tests/test_windows.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py
index f812c84d..6bf3c580 100755
--- a/psutil/tests/test_process.py
+++ b/psutil/tests/test_process.py
@@ -1273,11 +1273,9 @@ class TestProcess(PsutilTestCase):
assert_raises_nsp(fun, name)
# NtQuerySystemInformation succeeds even if process is gone.
- if WINDOWS:
+ if WINDOWS and not GITHUB_WHEELS:
normcase = os.path.normcase
- realpath = os.path.realpath
- self.assertEqual(normcase(realpath(p.exe())), realpath(
- normcase(PYTHON_EXE)))
+ self.assertEqual(normcase(p.exe()), normcase(PYTHON_EXE))
@unittest.skipIf(not POSIX, 'POSIX only')
def test_zombie_process(self):
diff --git a/psutil/tests/test_windows.py b/psutil/tests/test_windows.py
index b72570b4..370ac319 100755
--- a/psutil/tests/test_windows.py
+++ b/psutil/tests/test_windows.py
@@ -24,6 +24,7 @@ from psutil import WINDOWS
from psutil._compat import FileNotFoundError
from psutil._compat import super
from psutil.tests import APPVEYOR
+from psutil.tests import GITHUB_WHEELS
from psutil.tests import HAS_BATTERY
from psutil.tests import mock
from psutil.tests import PsutilTestCase
@@ -513,6 +514,7 @@ class TestProcessWMI(TestCase):
p = psutil.Process(self.pid)
self.assertEqual(p.name(), w.Caption)
+ @unittest.skipIf(GITHUB_WHEELS, "unreliable path on GITHUB_WHEELS")
def test_exe(self):
w = wmi.WMI().Win32_Process(ProcessId=self.pid)[0]
p = psutil.Process(self.pid)