diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | make.bat | 1 | ||||
-rw-r--r-- | test/test_psutil.py | 14 |
3 files changed, 8 insertions, 9 deletions
@@ -40,7 +40,7 @@ uninstall: if test $(PYTHON) = python2.4; then \ pip-2.4 uninstall -y -v psutil; \ else \ - cd /tmp; $(PYTHON) -m pip uninstall -y -v psutil; \ + cd ..; $(PYTHON) -m pip uninstall -y -v psutil; \ fi test: install @@ -20,7 +20,6 @@ if "%PYTHON%" == "" ( if "%TSCRIPT%" == "" ( set TSCRIPT=test\test_psutil.py ) -set PATH=%PYTHON%;%PATH% set PATH=C:\MinGW\bin;%PATH% diff --git a/test/test_psutil.py b/test/test_psutil.py index 41035d19..902ebd83 100644 --- a/test/test_psutil.py +++ b/test/test_psutil.py @@ -450,12 +450,12 @@ if WINDOWS: if hasattr(wv, 'service_pack_major'): # python >= 2.7 sp = wv.service_pack_major or 0 else: - r = re.search("\s\d$", wv.service_pack) + r = re.search("\s\d$", wv[4]) if r: sp = int(r.group(0)) else: sp = 0 - return (wv.major, wv.minor, sp) + return (wv[0], wv[1], sp) class ThreadTask(threading.Thread): @@ -1562,11 +1562,11 @@ class TestProcess(unittest.TestCase): elif WINDOWS and 'USERNAME' in os.environ: expected_username = os.environ['USERNAME'] expected_domain = os.environ['USERDOMAIN'] - domain, username = p.username.split('\\') + domain, username = p.username().split('\\') self.assertEqual(domain, expected_domain) self.assertEqual(username, expected_username) else: - p.username + p.username() def test_cwd(self): sproc = get_test_subprocess(wait=True) @@ -2072,11 +2072,11 @@ class TestProcess(unittest.TestCase): # username property try: if POSIX: - self.assertEqual(p.username, 'root') + self.assertEqual(p.username(), 'root') elif WINDOWS: - self.assertEqual(p.username, 'NT AUTHORITY\\SYSTEM') + self.assertEqual(p.username(), 'NT AUTHORITY\\SYSTEM') else: - p.username + p.username() except psutil.AccessDenied: pass |