From 8626bbd2cfcb10109cfa85b8d7ef99898e6f7771 Mon Sep 17 00:00:00 2001 From: nima Date: Sat, 20 Dec 2008 01:44:55 +0000 Subject: Removed "detected" from appearing in every single function call. TODO: An ivar should be implemented to return this string, so further cleanup is still required; as it stands, there is no access to this information anymore! Updated test case. Further general cleanup. git-svn-id: svn://svn.autonomy.net.au/python-dmidecode@133 abc39116-655e-4be6-ad55-d661dc543056 --- test.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'test.py') diff --git a/test.py b/test.py index 7eb9541..59608a8 100755 --- a/test.py +++ b/test.py @@ -50,22 +50,16 @@ for dev in devices: sys.stdout.write("...\n") for i in types: sys.stdout.write(" * Testing type %i..."%i); sys.stdout.flush() - output = len(dmidecode.type(i)) + output = dmidecode.type(i).keys() total += 1 - if output: - sys.stdout.write("Done\n") - success += 1 - else: - sys.stdout.write("FAILED\n") + sys.stdout.write("Done (%s)\n"%output) + success += 1 for section in sections: total += 1 sys.stdout.write(" * Testing %s..."%section); sys.stdout.flush() - output = getattr(dmidecode, section) - if output: - sys.stdout.write("Done\n") - success += 1 - else: - sys.stdout.write("FAILED\n") + output = getattr(dmidecode, section)().keys() + sys.stdout.write("Done (%s)\n"%output) + success += 1 else: sys.stdout.write("FAILED\n") -- cgit