[Numpy-svn] r5710 - trunk/numpy/testing

numpy-svn@scip... numpy-svn@scip...
Tue Aug 26 20:49:06 CDT 2008


Author: alan.mcintyre
Date: 2008-08-26 20:48:54 -0500 (Tue, 26 Aug 2008)
New Revision: 5710

Modified:
   trunk/numpy/testing/nosetester.py
Log:
Bail out of _docmethod earlier if method has no docstring.


Modified: trunk/numpy/testing/nosetester.py
===================================================================
--- trunk/numpy/testing/nosetester.py	2008-08-27 01:18:26 UTC (rev 5709)
+++ trunk/numpy/testing/nosetester.py	2008-08-27 01:48:54 UTC (rev 5710)
@@ -62,6 +62,9 @@
 
 # contructs NoseTester method docstrings
 def _docmethod(meth, testtype):
+    if not meth.__doc__:
+        return
+
     test_header = \
         '''Parameters
         ----------
@@ -82,8 +85,7 @@
             List with any extra args to pass to nosetests''' \
             % {'testtype': testtype}
 
-    if meth.__doc__:
-        meth.__doc__ = meth.__doc__ % {'test_header':test_header}
+    meth.__doc__ = meth.__doc__ % {'test_header':test_header}
 
 
 class NoseTester(object):



More information about the Numpy-svn mailing list