summaryrefslogtreecommitdiff
path: root/psutil/tests/test_linux.py
diff options
context:
space:
mode:
authorAlex Manuskin <amanusk@protonmail.com>2019-04-25 06:17:11 +0300
committerGiampaolo Rodola <g.rodola@gmail.com>2019-04-25 11:17:11 +0800
commit7ee88afd9f6730289cf9e34f70210fdb387b8a71 (patch)
tree86a14ec27de8f09b2f222e5a1898d37fe8dccdbf /psutil/tests/test_linux.py
parent611b44ec6e830d98c768038c66683c3fa1a7b491 (diff)
downloadpsutil-7ee88afd9f6730289cf9e34f70210fdb387b8a71.tar.gz
Update cpu_freq to return 0 for max/min if not available (#1487)
Diffstat (limited to 'psutil/tests/test_linux.py')
-rwxr-xr-xpsutil/tests/test_linux.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py
index e8745a75..4cdc9cbf 100755
--- a/psutil/tests/test_linux.py
+++ b/psutil/tests/test_linux.py
@@ -739,11 +739,11 @@ class TestSystemCPUFrequency(unittest.TestCase):
ret = psutil.cpu_freq()
assert ret
assert flags
- self.assertIsNone(ret.min)
- self.assertIsNone(ret.max)
+ self.assertEqual(ret.max, 0.0)
+ self.assertEqual(ret.min, 0.0)
for freq in psutil.cpu_freq(percpu=True):
- self.assertIsNone(freq.min)
- self.assertIsNone(freq.max)
+ self.assertEqual(ret.max, 0.0)
+ self.assertEqual(ret.min, 0.0)
finally:
reload_module(psutil._pslinux)
reload_module(psutil)