Show More
@@ -145,8 +145,15 b' def test_getdoc():' | |||
|
145 | 145 | def getdoc(self): |
|
146 | 146 | return "custom docstring" |
|
147 | 147 | |
|
148 | class C(object): | |
|
149 | """standard docstring""" | |
|
150 | def getdoc(self): | |
|
151 | return None | |
|
152 | ||
|
148 | 153 | a = A() |
|
149 | 154 | b = B() |
|
155 | c = C() | |
|
150 | 156 | |
|
151 | 157 | nt.assert_equal(oinspect.getdoc(a), "standard docstring") |
|
152 | 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