From b20fb8e701e808fee3866b3886affd9c9647a0e2 2011-12-06 00:26:00 From: Thomas Kluyver Date: 2011-12-06 00:26:00 Subject: [PATCH] Test for getdoc() returning None. --- diff --git a/IPython/core/tests/test_oinspect.py b/IPython/core/tests/test_oinspect.py index 00bc5b6..f7fc5ec 100644 --- a/IPython/core/tests/test_oinspect.py +++ b/IPython/core/tests/test_oinspect.py @@ -145,8 +145,15 @@ def test_getdoc(): def getdoc(self): return "custom docstring" + class C(object): + """standard docstring""" + def getdoc(self): + return None + a = A() b = B() + c = C() nt.assert_equal(oinspect.getdoc(a), "standard docstring") nt.assert_equal(oinspect.getdoc(b), "custom docstring") + nt.assert_equal(oinspect.getdoc(c), "standard docstring")