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/vnstat.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'py3status/modules/vnstat.py') diff --git a/py3status/modules/vnstat.py b/py3status/modules/vnstat.py index 14c3a9c..0da6fd2 100644 --- a/py3status/modules/vnstat.py +++ b/py3status/modules/vnstat.py @@ -8,7 +8,7 @@ REQUIRE external program called "vnstat" installed and configured to work. """ from __future__ import division # python2 compatibility -from time import time, sleep +from time import time from subprocess import check_output @@ -125,7 +125,11 @@ class Py3status: return response if __name__ == "__main__": + """ + Test this module by calling it directly. + """ + from time import sleep x = Py3status() while True: - print(x.currentSpeed(1, 1)) + print(x.currentSpeed([], {})) sleep(1) -- cgit v1.3