summaryrefslogtreecommitdiff
path: root/psutil/tests/test_posix.py
diff options
context:
space:
mode:
Diffstat (limited to 'psutil/tests/test_posix.py')
-rwxr-xr-xpsutil/tests/test_posix.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/psutil/tests/test_posix.py b/psutil/tests/test_posix.py
index 9ce82cae..c789ee87 100755
--- a/psutil/tests/test_posix.py
+++ b/psutil/tests/test_posix.py
@@ -62,10 +62,7 @@ def ps(fmt, pid=None):
cmd.append('ax')
if SUNOS:
- # XXX: set() has not get() method so this cannot work; not sure
- # what I meant in here.
- fmt_map = set(('command', 'comm', 'start', 'stime'))
- fmt = fmt_map.get(fmt, fmt)
+ fmt = fmt.replace("start", "stime")
cmd.extend(['-o', fmt])
@@ -373,6 +370,12 @@ class TestSystemAPIs(PsutilTestCase):
started = re.findall(r"[A-Z][a-z][a-z] \d\d", out)
if started:
tstamp = "%b %d"
+ else:
+ # 'apr 10' (sunOS)
+ started = re.findall(r"[a-z][a-z][a-z] \d\d", out)
+ if started:
+ tstamp = "%b %d"
+ started = [x.capitalize() for x in started]
if not tstamp:
raise ValueError(