Permalink
Browse files

Test for getdoc() returning None.

  • Loading branch information...
1 parent 72ad5d8 commit b20fb8e701e808fee3866b3886affd9c9647a0e2 @takluyver takluyver committed Dec 6, 2011
Showing with 7 additions and 0 deletions.
  1. +7 −0 IPython/core/tests/test_oinspect.py
View
7 IPython/core/tests/test_oinspect.py
@@ -145,8 +145,15 @@ class B(object):
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")

0 comments on commit b20fb8e

Please sign in to comment.