summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiampaolo Rodola <g.rodola@gmail.com>2017-01-24 17:51:37 +0100
committerGiampaolo Rodola <g.rodola@gmail.com>2017-01-24 17:51:37 +0100
commita17a6d6c0de3a9804452b13881eb544fc726b2d6 (patch)
tree31d5c53587a454e0c0af00e7c083c4788dd3829c
parentb64b87943b2e1d5955db90a94de611bf2c4bad2a (diff)
downloadpsutil-a17a6d6c0de3a9804452b13881eb544fc726b2d6.tar.gz
#371 add sensors.py example script
-rwxr-xr-xpsutil/tests/test_misc.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/psutil/tests/test_misc.py b/psutil/tests/test_misc.py
index 0b696f8c..e534e006 100755
--- a/psutil/tests/test_misc.py
+++ b/psutil/tests/test_misc.py
@@ -388,7 +388,7 @@ class TestScripts(unittest.TestCase):
src = f.read()
ast.parse(src)
- def test_check_presence(self):
+ def test_coverage(self):
# make sure all example scripts have a test method defined
meths = dir(self)
for name in os.listdir(SCRIPTS_DIR):
@@ -469,6 +469,11 @@ class TestScripts(unittest.TestCase):
def test_cpu_distribution(self):
self.assert_syntax('cpu_distribution.py')
+ @unittest.skipUnless(hasattr(psutil, "sensors_temperatures"),
+ "platform not supported")
+ def test_sensors(self):
+ self.assert_stdout('sensors.py')
+
# ===================================================================
# --- Unit tests for test utilities.