Fixed some erroneous "no test suite" messages in test.py.
authorW. Trevor King <wking@drexel.edu>
Mon, 1 Dec 2008 19:08:59 +0000 (14:08 -0500)
committerW. Trevor King <wking@drexel.edu>
Mon, 1 Dec 2008 19:08:59 +0000 (14:08 -0500)
test.py

diff --git a/test.py b/test.py
index ef876bacad8846498ac7b64100bc19e6dd582f8a..1f1ffcfd804889b85ce17932f4e80485420e2140 100644 (file)
--- a/test.py
+++ b/test.py
@@ -19,11 +19,12 @@ if len(sys.argv) > 1:
     for submodname in sys.argv[1:]:
         match = False
         mod = plugin.get_plugin("libbe", submodname)
-        if mod is not None and hasattr(mod, "suite"):
-            suite.addTest(mod.suite)
-            match = True
-        else:
-            print "Module \"%s\" has no test suite" % submodname
+        if mod is not None:
+            if hasattr(mod, "suite"):
+                suite.addTest(mod.suite)
+                match = True
+            else:
+                print "Module \"%s\" has no test suite" % submodname
         mod = plugin.get_plugin("becommands", submodname)
         if mod is not None:
             suite.addTest(doctest.DocTestSuite(mod))