We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3d71b5e commit 7c1b0a4Copy full SHA for 7c1b0a4
Lib/test/test_pdb.py
@@ -1700,6 +1700,26 @@ def test_pdb_issue_gh_103225():
1700
(Pdb) continue
1701
"""
1702
1703
+def test_pdb_issue_gh_101517():
1704
+ """See GH-101517
1705
+
1706
+ Make sure pdb doesn't crash when the exception is caught in a try/except* block
1707
1708
+ >>> def test_function():
1709
+ ... try:
1710
+ ... raise KeyError
1711
+ ... except* Exception as e:
1712
+ ... import pdb; pdb.Pdb(nosigint=True, readrc=False).set_trace()
1713
1714
+ >>> with PdbTestInput([ # doctest: +NORMALIZE_WHITESPACE
1715
+ ... 'continue'
1716
+ ... ]):
1717
+ ... test_function()
1718
+ --Return--
1719
+ > <doctest test.test_pdb.test_pdb_issue_gh_101517[0]>(None)test_function()->None
1720
+ (Pdb) continue
1721
+ """
1722
1723
1724
@support.requires_subprocess()
1725
class PdbTestCase(unittest.TestCase):
0 commit comments