Adjusted be-mbox-to-xml to not drop author info from multipart messages
[be.git] / test.py
diff --git a/test.py b/test.py
index 57091c79ca7be177f830b46193febf0275640335..4f20808b326ad1c078e5dd28c1d49fd8524e9033 100644 (file)
--- a/test.py
+++ b/test.py
@@ -8,6 +8,8 @@ When called with module name arguments, only run the doctests from
 those modules.
 """
 
+import libbe
+libbe.TESTING = True
 from libbe import plugin, vcs
 import unittest
 import doctest
@@ -27,7 +29,10 @@ if len(sys.argv) > 1:
                 print "Module \"%s\" has no test suite" % submodname
         mod = plugin.get_plugin("becommands", submodname)
         if mod is not None:
-            suite.addTest(doctest.DocTestSuite(mod))
+            if hasattr(mod, "suite"):
+                suite.addTest(mod.suite)
+            else:
+                suite.addTest(doctest.DocTestSuite(mod))
             match = True
         if not match:
             print "No modules match \"%s\"" % submodname