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

Method test_fail_showtopic

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

Source from the content-addressed store, hash-verified

835 self.assertIn('The "with" statement', helptext)
836
837 def test_fail_showtopic(self):
838 with captured_stdout() as showtopic_io:
839 helper = pydoc.Helper()
840 helper.showtopic('abd')
841 expected = "no documentation found for 'abd'"
842 self.assertEqual(expected, showtopic_io.getvalue().strip())
843
844 @unittest.mock.patch('pydoc.pager')
845 def test_fail_showtopic_output_redirect(self, pager_mock):

Callers

nothing calls this directly

Calls 5

showtopicMethod · 0.95
captured_stdoutFunction · 0.90
assertEqualMethod · 0.45
stripMethod · 0.45
getvalueMethod · 0.45

Tested by

no test coverage detected