Remove _test() functions from plugin.py and cmdutil.py.
authorW. Trevor King <wking@drexel.edu>
Fri, 4 Dec 2009 01:16:56 +0000 (20:16 -0500)
committerW. Trevor King <wking@drexel.edu>
Fri, 4 Dec 2009 01:16:56 +0000 (20:16 -0500)
Testing should be handled through test.py, not by calling per-module
_test() functions.

libbe/cmdutil.py
libbe/plugin.py

index e37750deb51162e6a1c75ee034fc1d036b5c518b..78645abb3afe4ab1590c2220a1f6a55d5f230b02 100644 (file)
@@ -293,12 +293,4 @@ def bug_comment_from_id(bdir, id):
             raise UserError(e.message)
     return (bug, comm)
 
-def _test():
-    import doctest
-    import sys
-    doctest.testmod()
-
-if __name__ == "__main__":
-    _test()
-
 suite = doctest.DocTestSuite()
index bd9bb65614c58cce3fe9cf597300b69e7ea3cc4b..e6b06fb02121d546e363628a1e4c78043768cbcd 100644 (file)
@@ -69,10 +69,3 @@ if plugin_path not in sys.path:
     sys.path.append(plugin_path)
 
 suite = doctest.DocTestSuite()
-
-def _test():
-    import doctest
-    doctest.testmod()
-
-if __name__ == "__main__":
-    _test()