MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_builtin

Method test_builtin

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

Source from the content-addressed store, hash-verified

1508 'class C\x08C(collections.abc.Mapping, typing.Generic)')
1509
1510 def test_builtin(self):
1511 for name in ('str', 'str.translate', 'builtins.str',
1512 'builtins.str.translate'):
1513 # test low-level function
1514 self.assertIsNotNone(pydoc.locate(name))
1515 # test high-level function
1516 try:
1517 pydoc.render_doc(name)
1518 except ImportError:
1519 self.fail('finding the doc of {!r} failed'.format(name))
1520
1521 for name in ('notbuiltins', 'strrr', 'strr.translate',
1522 'str.trrrranslate', 'builtins.strrr',
1523 'builtins.str.trrranslate'):
1524 self.assertIsNone(pydoc.locate(name))
1525 self.assertRaises(ImportError, pydoc.render_doc, name)
1526
1527 @staticmethod
1528 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