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

Method test_issue46434

Lib/test/test_pdb.py:3789–3808  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3787 "Got a syntax error running test script under PDB")
3788
3789 def test_issue46434(self):
3790 # Temporarily patch in an extra help command which doesn't have a
3791 # docstring to emulate what happens in an embeddable distribution
3792 script = """
3793 def do_testcmdwithnodocs(self, arg):
3794 pass
3795
3796 import pdb
3797 pdb.Pdb.do_testcmdwithnodocs = do_testcmdwithnodocs
3798 """
3799 commands = """
3800 continue
3801 help testcmdwithnodocs
3802 """
3803 stdout, stderr = self.run_pdb_script(script, commands)
3804 output = (stdout or '') + (stderr or '')
3805 self.assertNotIn('AttributeError', output,
3806 'Calling help on a command with no docs should be handled gracefully')
3807 self.assertIn("*** No help for 'testcmdwithnodocs'; __doc__ string missing", output,
3808 'Calling help on a command with no docs should print an error')
3809
3810 def test_issue13183(self):
3811 script = """

Callers

nothing calls this directly

Calls 3

run_pdb_scriptMethod · 0.95
assertNotInMethod · 0.80
assertInMethod · 0.80

Tested by

no test coverage detected