diff options
author | Alan McIntyre <alan.mcintyre@local> | 2008-08-27 01:48:54 +0000 |
---|---|---|
committer | Alan McIntyre <alan.mcintyre@local> | 2008-08-27 01:48:54 +0000 |
commit | d4a1e796a44cbfaf087e8ce8feee61ca42447aee (patch) | |
tree | 549951887ea03dc12beda3f4697850d93792d487 /numpy | |
parent | d495708ee0be06f1be32c0c578c882bc48d4f5a2 (diff) | |
download | numpy-d4a1e796a44cbfaf087e8ce8feee61ca42447aee.tar.gz |
Bail out of _docmethod earlier if method has no docstring.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/testing/nosetester.py | 6 |
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): |