From d78a8a7d20ae2263e7e62251749c4164ccae6e28 Mon Sep 17 00:00:00 2001 From: Martin Kepplinger <martin.kepplinger@puri.sm> Date: Tue, 3 Nov 2020 08:43:16 +0100 Subject: [PATCH] pytests: add basic test for the m41t80 rtc as we test for it being rtc0 this basically assumes that it's the only rtc too. --- pytests/test_rtc.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 pytests/test_rtc.py diff --git a/pytests/test_rtc.py b/pytests/test_rtc.py new file mode 100644 index 0000000..57d9294 --- /dev/null +++ b/pytests/test_rtc.py @@ -0,0 +1,3 @@ +def test_rtc0_exists(): + with open('/sys/class/rtc/rtc0/name') as f: + assert('rtc-m41t80' in f.readline().strip()) -- GitLab