aboutsummaryrefslogtreecommitdiffstats
path: root/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test.py')
-rw-r--r--test.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/test.py b/test.py
new file mode 100644
index 0000000..8913c1f
--- /dev/null
+++ b/test.py
@@ -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])