aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_stats.py
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-10 18:23:20 +0100
committerDanilo M. <danix@danix.xyz>2026-11-10 18:23:20 +0100
commit5b85512ccd0d87cb61c30f73cea262c7a0545d37 (patch)
treeb186fd0b5f1fad48c5b0be6b78da3661ea6aa8c8 /tests/test_stats.py
parent624a7a845c601990f5550a3cb3db38b139feb5da (diff)
downloaddeck-it-5b85512ccd0d87cb61c30f73cea262c7a0545d37.tar.gz
deck-it-5b85512ccd0d87cb61c30f73cea262c7a0545d37.zip
feat(stats): an OS row with logo, kernel and uptime
The System card's small 'up Nh' line becomes a full-width tile: the distro's Nerd Font logo, NAME and VERSION_ID from /etc/os-release in large type, the codename and kernel release below, and the uptime large on the right. An unknown distro gets Tux. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'tests/test_stats.py')
-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"')