gh-125115 : Refactor the pdb parsing issue so positional arguments ca… · python/cpython@5348c20 · GitHub
Skip to content

Commit 5348c20

Browse files
gh-125115 : Refactor the pdb parsing issue so positional arguments can pass through (#140933)
1 parent e33afa7 commit 5348c20

3 files changed

Lines changed: 48 additions & 36 deletions

File tree

Lib/pdb.py

Lines changed: 43 additions & 35 deletions

Lib/test/test_pdb.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3974,7 +3974,10 @@ def test_run_module_with_args(self):
39743974
commands = """
39753975
continue
39763976
"""
3977-
self._run_pdb(["calendar", "-m"], commands, expected_returncode=2)
3977+
self._run_pdb(["calendar", "-m"], commands, expected_returncode=1)
3978+
3979+
_, stderr = self._run_pdb(["-m", "calendar", "-p", "1"], commands)
3980+
self.assertIn("unrecognized arguments: -p", stderr)
39783981

39793982
stdout, _ = self._run_pdb(["-m", "calendar", "1"], commands)
39803983
self.assertIn("December", stdout)
Lines changed: 1 addition & 0 deletions

0 commit comments

Comments
 (0)