File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1700,6 +1700,26 @@ def test_pdb_issue_gh_103225():
1700
1700
(Pdb) continue
1701
1701
"""
1702
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
+
1703
1723
1704
1724
@support .requires_subprocess ()
1705
1725
class PdbTestCase (unittest .TestCase ):
You can’t perform that action at this time.
0 commit comments