MCPcopy Index your code
hub / github.com/python/cpython / test_builtin

Method test_builtin

Lib/test/test_pydoc/test_pydoc.py:1458–1473  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1456 'class C\x08C(collections.abc.Mapping, typing.Generic)')
1457
1458 def test_builtin(self):
1459 for name in ('str', 'str.translate', 'builtins.str',
1460 'builtins.str.translate'):
1461 # test low-level function
1462 self.assertIsNotNone(pydoc.locate(name))
1463 # test high-level function
1464 try:
1465 pydoc.render_doc(name)
1466 except ImportError:
1467 self.fail('finding the doc of {!r} failed'.format(name))
1468
1469 for name in ('notbuiltins', 'strrr', 'strr.translate',
1470 'str.trrrranslate', 'builtins.strrr',
1471 'builtins.str.trrranslate'):
1472 self.assertIsNone(pydoc.locate(name))
1473 self.assertRaises(ImportError, pydoc.render_doc, name)
1474
1475 @staticmethod
1476 def _get_summary_line(o):

Callers

nothing calls this directly

Calls 6

assertIsNotNoneMethod · 0.80
locateMethod · 0.80
assertIsNoneMethod · 0.80
failMethod · 0.45
formatMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected