diff options
author | W. Trevor King <wking@drexel.edu> | 2009-12-12 00:31:55 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2009-12-12 00:31:55 -0500 |
commit | bf3d434b244c57556bec979acbc658c30eb58221 (patch) | |
tree | a31746f74a9aaaf1d95c4bd7e1ef1ae30041f2f8 /test.py | |
parent | a153347564e4c6baa0388fda05530f5548d16ac5 (diff) | |
download | bugseverywhere-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.py | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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() |