summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2015-02-04 06:46:24 -0800
committerGiampaolo Rodola <g.rodola@gmail.com>2015-02-04 06:46:24 -0800
commita5c6553baac1f68d0635e6a60edaa573e1857902 (patch)
tree9300c533cb13e9a6c335d470e12cdcc374344977
parent19fcf2a6dae339892f414f2b00eef50373a6ddb8 (diff)
downloadpsutil-a5c6553baac1f68d0635e6a60edaa573e1857902.tar.gz
fix test errors on Windows
-rw-r--r--test/_windows.py4
-rw-r--r--test/test_psutil.py2
2 files changed, 4 insertions, 2 deletions
diff --git a/test/_windows.py b/test/_windows.py
index 5f61bd20..9c07142a 100644
--- a/test/_windows.py
+++ b/test/_windows.py
@@ -113,7 +113,9 @@ class WindowsSpecificTestCase(unittest.TestCase):
def test_process_exe(self):
w = wmi.WMI().Win32_Process(ProcessId=self.pid)[0]
p = psutil.Process(self.pid)
- self.assertEqual(p.exe(), w.ExecutablePath)
+ # Note: wmi reports the exe as a lower case string.
+ # Being Windows paths case-insensitive we ignore that.
+ self.assertEqual(p.exe().lower(), w.ExecutablePath.lower())
@unittest.skipIf(wmi is None, "wmi module is not installed")
def test_process_cmdline(self):
diff --git a/test/test_psutil.py b/test/test_psutil.py
index d5821974..0939e798 100644
--- a/test/test_psutil.py
+++ b/test/test_psutil.py
@@ -125,7 +125,7 @@ def get_test_subprocess(cmd=None, stdout=DEVNULL, stderr=DEVNULL,
pyline = ""
if wait:
pyline += "open(r'%s', 'w'); " % TESTFN
- pyline += "import time; time.sleep(2);"
+ pyline += "import time; time.sleep(60);"
cmd_ = [PYTHON, "-c", pyline]
else:
cmd_ = cmd