From d495708ee0be06f1be32c0c578c882bc48d4f5a2 Mon Sep 17 00:00:00 2001 From: Alan McIntyre Date: Wed, 27 Aug 2008 01:18:26 +0000 Subject: Make _docmethod work correctly when run with -OO --- numpy/testing/nosetester.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'numpy/testing/nosetester.py') diff --git a/numpy/testing/nosetester.py b/numpy/testing/nosetester.py index ee682967c..2afb3e186 100644 --- a/numpy/testing/nosetester.py +++ b/numpy/testing/nosetester.py @@ -82,7 +82,8 @@ def _docmethod(meth, testtype): List with any extra args to pass to nosetests''' \ % {'testtype': testtype} - meth.__doc__ = meth.__doc__ % {'test_header':test_header} + if meth.__doc__: + meth.__doc__ = meth.__doc__ % {'test_header':test_header} class NoseTester(object): -- cgit v1.2.1