From: W. Trevor King Date: Sun, 29 Nov 2009 01:27:53 +0000 (-0500) Subject: test.py now uses unittest.TestSuite 'suite' in becommands if present. X-Git-Tag: 1.0.0~59^2~76^2~10 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7e95956f5088346807a233c63f5bc25436550ef8;p=be.git test.py now uses unittest.TestSuite 'suite' in becommands if present. Such 'suite' instances have been required for libbe submodules. This will allow becommands to test themselves more thoroughly than they could with only doctests. --- diff --git a/test.py b/test.py index 57091c7..81674cf 100644 --- a/test.py +++ b/test.py @@ -27,7 +27,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