From 7e95956f5088346807a233c63f5bc25436550ef8 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 28 Nov 2009 20:27:53 -0500 Subject: [PATCH] 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. --- test.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.26.2