diff options
author | Irit Katriel <iritkatriel@yahoo.com> | 2021-04-01 15:25:59 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-01 15:25:59 (GMT) |
commit | 652bfdee9495dca241d48278742fe035b7a82bdb (patch) | |
tree | 709028598de16a04558c77f52d6e47eeb0a1401b /Lib/test/test_pdb.py | |
parent | fcb55c0037baab6f98f91ee38ce84b6f874f034a (diff) | |
download | cpython-652bfdee9495dca241d48278742fe035b7a82bdb.zip cpython-652bfdee9495dca241d48278742fe035b7a82bdb.tar.gz cpython-652bfdee9495dca241d48278742fe035b7a82bdb.tar.bz2 |
bpo-26053: Fix args echoed by pdb run command (#22033)
Diffstat (limited to 'Lib/test/test_pdb.py')
-rw-r--r-- | Lib/test/test_pdb.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py index 51cd378..9f0db02 100644 --- a/Lib/test/test_pdb.py +++ b/Lib/test/test_pdb.py @@ -1443,6 +1443,19 @@ def bœr(): 'Fail to handle a syntax error in the debuggee.' .format(expected, stdout)) + def test_issue26053(self): + # run command of pdb prompt echoes the correct args + script = "print('hello')" + commands = """ + continue + run a b c + run d e f + quit + """ + stdout, stderr = self.run_pdb_script(script, commands) + output = '\n'.join([x.strip() for x in stdout.splitlines()]) + self.assertIn("Restarting main.py with arguments:\na b c", output) + self.assertIn("Restarting main.py with arguments:\nd e f", output) def test_readrc_kwarg(self): script = textwrap.dedent(""" |