From bf3d434b244c57556bec979acbc658c30eb58221 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 12 Dec 2009 00:31:55 -0500 Subject: Added libbe.command.base (with Command class) and moved list command to new format. --- test.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'test.py') 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() -- cgit