diff options
Diffstat (limited to 'tests/test_wa_sysfs_extractor.py')
-rw-r--r-- | tests/test_wa_sysfs_extractor.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_wa_sysfs_extractor.py b/tests/test_wa_sysfs_extractor.py index 7f2f12a..2d7a54e 100644 --- a/tests/test_wa_sysfs_extractor.py +++ b/tests/test_wa_sysfs_extractor.py @@ -15,6 +15,7 @@ import os import subprocess +import unittest import utils_tests @@ -46,3 +47,14 @@ class TestWASysfsExtractor(utils_tests.SetupDirectory): """Test that printing the thermal params doesn't bomb""" cr2.wa.SysfsExtractor(".").pretty_print_in_ipython() + +class TestWASysfsExtractorFailMode(unittest.TestCase): + """Test the failure modes of the Workload Automation sysfs extractor""" + + def test_get_params_invalid_directory(self): + """An invalid directory for cr2.wa.SysfsExtractor doesn't bomb""" + + sysfs_extractor = cr2.wa.SysfsExtractor(".") + self.assertEquals(sysfs_extractor.get_parameters(), {}) + + sysfs_extractor.pretty_print_in_ipython() |