aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_stats.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_stats.py b/tests/test_stats.py
index f32bfac..f732054 100644
--- a/tests/test_stats.py
+++ b/tests/test_stats.py
@@ -45,6 +45,12 @@ class Names(unittest.TestCase):
"Intel Core i7-8550U")
self.assertIsNone(stats._cpu_name(""))
+ def test_os(self):
+ self.assertEqual(stats._os('NAME=Slackware\nVERSION_ID=16.0\nID=slackware\n'
+ 'VERSION_CODENAME=current\n'),
+ {"id": "slackware", "name": "Slackware 16.0", "codename": "current"})
+ self.assertEqual(stats._os(""), {"id": "linux", "name": "Linux", "codename": ""})
+
def test_gpu_name(self):
line = ('03:00.0 "VGA compatible controller" "Intel Corporation" '
'"Battlemage G21 [Arc B580]" -p00 "Vendor" "Device 4215"')