From 2d016637ea3b836fb05ae452a8ea2ddf50ccc619 Mon Sep 17 00:00:00 2001 From: Ultrabug Date: Sun, 21 Dec 2014 20:07:01 +0100 Subject: add standalone test code --- py3status/modules/sysdata.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'py3status/modules/sysdata.py') diff --git a/py3status/modules/sysdata.py b/py3status/modules/sysdata.py index 60283ac..cea950d 100644 --- a/py3status/modules/sysdata.py +++ b/py3status/modules/sysdata.py @@ -138,3 +138,14 @@ class Py3status: response['cached_until'] = time() + self.cache_timeout return response + +if __name__ == "__main__": + """ + Test this module by calling it directly. + """ + from time import sleep + x = Py3status() + while True: + print(x.cpuInfo([], {})) + print(x.ramInfo([], {})) + sleep(1) -- cgit v1.3