##// END OF EJS Templates
Test for getdoc() returning None.
Thomas Kluyver -
Show More
@@ -145,8 +145,15 b' def test_getdoc():'
145 def getdoc(self):
145 def getdoc(self):
146 return "custom docstring"
146 return "custom docstring"
147
147
148 class C(object):
149 """standard docstring"""
150 def getdoc(self):
151 return None
152
148 a = A()
153 a = A()
149 b = B()
154 b = B()
155 c = C()
150
156
151 nt.assert_equal(oinspect.getdoc(a), "standard docstring")
157 nt.assert_equal(oinspect.getdoc(a), "standard docstring")
152 nt.assert_equal(oinspect.getdoc(b), "custom docstring")
158 nt.assert_equal(oinspect.getdoc(b), "custom docstring")
159 nt.assert_equal(oinspect.getdoc(c), "standard docstring")
General Comments 0
You need to be logged in to leave comments. Login now