aboutsummaryrefslogtreecommitdiffstats
path: root/test.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2009-12-12 00:31:55 -0500
committerW. Trevor King <wking@drexel.edu>2009-12-12 00:31:55 -0500
commitbf3d434b244c57556bec979acbc658c30eb58221 (patch)
treea31746f74a9aaaf1d95c4bd7e1ef1ae30041f2f8 /test.py
parenta153347564e4c6baa0388fda05530f5548d16ac5 (diff)
downloadbugseverywhere-bf3d434b244c57556bec979acbc658c30eb58221.tar.gz
Added libbe.command.base (with Command class) and moved list command to new format.
Diffstat (limited to 'test.py')
-rw-r--r--test.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/test.py b/test.py
index 2b93bcf..fecff8c 100644
--- a/test.py
+++ b/test.py
@@ -1,3 +1,5 @@
+# Copyright
+
"""Usage: python test.py [module(s) ...]
When called without optional module names, run the test suites for
@@ -49,14 +51,14 @@ def python_tree(root_path='libbe', root_modname='libbe'):
f.parent.append(f)
return tree
-def add_module_tests(suite, module_name):
- mod = import_by_name(module_name)
- if mod == None:
- raise KeyError, 'module "%s" not found' % module_name
+def add_module_tests(suite, modname):
+ mod = import_by_name(modname)
if hasattr(mod, 'suite'):
s = mod.suite
else:
s = unittest.TestLoader().loadTestsFromModule(mod)
+ sdoc = doctest.DocTestSuite(mod)
+ suite.addTest(sdoc)
suite.addTest(s)
suite = unittest.TestSuite()