diff options
author | W. Trevor King <wking@drexel.edu> | 2008-11-24 18:29:16 -0500 |
---|---|---|
committer | W. Trevor King <wking@drexel.edu> | 2008-11-24 18:29:16 -0500 |
commit | a711ecf10df62e30d83c1941065404c53fecd35b (patch) | |
tree | 4111ef606fa52dc7f21ca3eb357ff83fae74fe1e /libbe/plugin.py | |
parent | c5d7551e6a6e98bb6da7c7d11360224edfda2f14 (diff) | |
parent | 2c3f6c066ceb03ae3579dff029bf01f0b62c1f82 (diff) | |
download | bugseverywhere-a711ecf10df62e30d83c1941065404c53fecd35b.tar.gz |
Merge from W. Trevor King's tree.
Diffstat (limited to 'libbe/plugin.py')
-rw-r--r-- | libbe/plugin.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libbe/plugin.py b/libbe/plugin.py index 4016ca1..0964fba 100644 --- a/libbe/plugin.py +++ b/libbe/plugin.py @@ -17,6 +17,8 @@ import os import os.path import sys +import doctest + def my_import(mod_name): module = __import__(mod_name) components = mod_name.split('.') @@ -34,6 +36,8 @@ def iter_plugins(prefix): modfiles = os.listdir(os.path.join(plugin_path, prefix)) modfiles.sort() for modfile in modfiles: + if modfile.startswith('.'): + continue # the occasional emacs temporary file if modfile.endswith(".py") and modfile != "__init__.py": yield modfile[:-3], my_import(prefix+"."+modfile[:-3]) @@ -55,6 +59,9 @@ def get_plugin(prefix, name): plugin_path = os.path.realpath(os.path.dirname(os.path.dirname(__file__))) if plugin_path not in sys.path: sys.path.append(plugin_path) + +suite = doctest.DocTestSuite() + def _test(): import doctest doctest.testmod() |