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

Method test_issue13183

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

Source from the content-addressed store, hash-verified

3808 'Calling help on a command with no docs should print an error')
3809
3810 def test_issue13183(self):
3811 script = """
3812 from bar import bar
3813
3814 def foo():
3815 bar()
3816
3817 def nope():
3818 pass
3819
3820 def foobar():
3821 foo()
3822 nope()
3823
3824 foobar()
3825 """
3826 commands = """
3827 from bar import bar
3828 break bar
3829 continue
3830 step
3831 step
3832 quit
3833 """
3834 bar = """
3835 def bar():
3836 pass
3837 """
3838 with open('bar.py', 'w') as f:
3839 f.write(textwrap.dedent(bar))
3840 self.addCleanup(os_helper.unlink, 'bar.py')
3841 stdout, stderr = self.run_pdb_script(script, commands)
3842 self.assertTrue(
3843 any('main.py(5)foo()->None' in l for l in stdout.splitlines()),
3844 'Fail to step into the caller after a return')
3845
3846 def test_issue13120(self):
3847 # Invoking "continue" on a non-main thread triggered an exception

Callers

nothing calls this directly

Calls 8

run_pdb_scriptMethod · 0.95
addCleanupMethod · 0.80
assertTrueMethod · 0.80
openFunction · 0.50
anyFunction · 0.50
writeMethod · 0.45
dedentMethod · 0.45
splitlinesMethod · 0.45

Tested by

no test coverage detected