(self)
| 3945 | self.assertRegex(res, "Restarting .* with arguments:\nd e f") |
| 3946 | |
| 3947 | def test_issue58956(self): |
| 3948 | # Set a breakpoint in a function that already exists on the call stack |
| 3949 | # should enable the trace function for the frame. |
| 3950 | script = """ |
| 3951 | import bar |
| 3952 | def foo(): |
| 3953 | ret = bar.bar() |
| 3954 | pass |
| 3955 | foo() |
| 3956 | """ |
| 3957 | commands = """ |
| 3958 | b bar.bar |
| 3959 | c |
| 3960 | b main.py:5 |
| 3961 | c |
| 3962 | p ret |
| 3963 | quit |
| 3964 | """ |
| 3965 | bar = """ |
| 3966 | def bar(): |
| 3967 | return 42 |
| 3968 | """ |
| 3969 | with open('bar.py', 'w') as f: |
| 3970 | f.write(textwrap.dedent(bar)) |
| 3971 | self.addCleanup(os_helper.unlink, 'bar.py') |
| 3972 | stdout, stderr = self.run_pdb_script(script, commands) |
| 3973 | lines = stdout.splitlines() |
| 3974 | self.assertIn('-> pass', lines) |
| 3975 | self.assertIn('(Pdb) 42', lines) |
| 3976 | |
| 3977 | def test_step_into_botframe(self): |
| 3978 | # gh-125422 |
nothing calls this directly
no test coverage detected