summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/testing/nosetester.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/numpy/testing/nosetester.py b/numpy/testing/nosetester.py
index 2afb3e186..d4e523c52 100644
--- a/numpy/testing/nosetester.py
+++ b/numpy/testing/nosetester.py
@@ -62,6 +62,9 @@ def run_module_suite(file_to_run = None):
# contructs NoseTester method docstrings
def _docmethod(meth, testtype):
+ if not meth.__doc__:
+ return
+
test_header = \
'''Parameters
----------
@@ -82,8 +85,7 @@ def _docmethod(meth, testtype):
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):