diff options
author | Aaron Bentley <abentley@panoramicfeedback.com> | 2005-03-11 21:49:42 +0000 |
---|---|---|
committer | Aaron Bentley <abentley@panoramicfeedback.com> | 2005-03-11 21:49:42 +0000 |
commit | 71597577918f8d8206256293a7c985bc800a1363 (patch) | |
tree | 114799cc2b992f63c3b3bc12ed7526e9a7a145dd /test.py | |
parent | 6d32caa83004a2b3571754ddde5a389bac38423d (diff) | |
download | bugseverywhere-71597577918f8d8206256293a7c985bc800a1363.tar.gz |
Added unit testing framework
Diffstat (limited to 'test.py')
-rw-r--r-- | test.py | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -0,0 +1,20 @@ +from libbe import plugin +import doctest +import sys +if len(sys.argv) > 1: + match = False + mod = plugin.get_plugin("libbe", sys.argv[1]) + if mod is not None: + doctest.testmod(mod) + match = True + mod = plugin.get_plugin("becommands", sys.argv[1]) + if mod is not None: + doctest.testmod(mod) + match = True + if not match: + print "No modules match \"%s\"" % sys.argv[1] +else: + for module in plugin.iter_plugins("libbe"): + doctest.testmod(module[1]) + for module in plugin.iter_plugins("becommands"): + doctest.testmod(module[1]) |