MCPcopy Index your code
hub / github.com/ipython/ipython / test_getdoc

Function test_getdoc

tests/test_oinspect.py:271–295  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

269
270
271def test_getdoc():
272 class A(object):
273 """standard docstring"""
274
275 pass
276
277 class B(object):
278 """standard docstring"""
279
280 def getdoc(self):
281 return "custom docstring"
282
283 class C(object):
284 """standard docstring"""
285
286 def getdoc(self):
287 return None
288
289 a = A()
290 b = B()
291 c = C()
292
293 assert oinspect.getdoc(a) == "standard docstring"
294 assert oinspect.getdoc(b) == "custom docstring"
295 assert oinspect.getdoc(c) == "standard docstring"
296
297
298def test_empty_property_has_no_source():

Callers

nothing calls this directly

Calls 4

AClass · 0.70
BClass · 0.70
CClass · 0.70
getdocMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…