summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2017-05-03 01:53:44 +0200
committerGiampaolo Rodola <g.rodola@gmail.com>2017-05-03 01:53:44 +0200
commit530ba0677c5feef27eb5af054af54e80d20392f3 (patch)
treef1855f02f90931586af24836e0bf11eea8b5c808
parent36fe8dacf24098502fb782cfc4b05ccc24734d13 (diff)
downloadpsutil-530ba0677c5feef27eb5af054af54e80d20392f3.tar.gz
fix ionice test on windows + update ionice doc
-rw-r--r--docs/index.rst3
-rwxr-xr-xpsutil/tests/test_contracts.py7
2 files changed, 6 insertions, 4 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 394aeae8..16301958 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -1245,7 +1245,8 @@ Process class
>>>
On Windows only *ioclass* is used and it can be set to ``2`` (normal),
- ``1`` (low) or ``0`` (very low).
+ ``1`` (low) or ``0`` (very low). Also it returns an integer instead of a
+ named tuple.
Availability: Linux and Windows > Vista
diff --git a/psutil/tests/test_contracts.py b/psutil/tests/test_contracts.py
index f44b7a41..d3c0377a 100755
--- a/psutil/tests/test_contracts.py
+++ b/psutil/tests/test_contracts.py
@@ -430,9 +430,10 @@ class TestFetchAllProcesses(unittest.TestCase):
self.assertGreaterEqual(field, 0)
def ionice(self, ret, proc):
- assert is_namedtuple(ret)
- for field in ret:
- self.assertIsInstance(field, int)
+ if POSIX:
+ assert is_namedtuple(ret)
+ for field in ret:
+ self.assertIsInstance(field, int)
if LINUX:
self.assertGreaterEqual(ret.ioclass, 0)
self.assertGreaterEqual(ret.value, 0)