diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2023-04-24 20:58:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-24 20:58:51 (GMT) |
commit | 1c01f8d79760ca74f6d35b839d23ac408b3bb44e (patch) | |
tree | 063a9d5c424f015f313de485ece95b4a441d9b01 /Lib/test | |
parent | 518050ced18422fd00fadc1a81b0d942b98e2e5b (diff) | |
download | cpython-1c01f8d79760ca74f6d35b839d23ac408b3bb44e.zip cpython-1c01f8d79760ca74f6d35b839d23ac408b3bb44e.tar.gz cpython-1c01f8d79760ca74f6d35b839d23ac408b3bb44e.tar.bz2 |
gh-101517: fix line number propagation in code generated for except* (#103550)
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_bdb.py | 3 | ||||
-rw-r--r-- | Lib/test/test_pdb.py | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_bdb.py b/Lib/test/test_bdb.py index fc4b809..568c88e 100644 --- a/Lib/test/test_bdb.py +++ b/Lib/test/test_bdb.py @@ -1207,7 +1207,8 @@ class IssuesTestCase(BaseTestCase): class TestRegressions(unittest.TestCase): def test_format_stack_entry_no_lineno(self): # See gh-101517 - Bdb().format_stack_entry((sys._getframe(), None)) + self.assertIn('Warning: lineno is None', + Bdb().format_stack_entry((sys._getframe(), None))) if __name__ == "__main__": diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py index 94b4417..b5c413a 100644 --- a/Lib/test/test_pdb.py +++ b/Lib/test/test_pdb.py @@ -1715,8 +1715,8 @@ def test_pdb_issue_gh_101517(): ... 'continue' ... ]): ... test_function() - --Return-- - > <doctest test.test_pdb.test_pdb_issue_gh_101517[0]>(None)test_function()->None + > <doctest test.test_pdb.test_pdb_issue_gh_101517[0]>(5)test_function() + -> import pdb; pdb.Pdb(nosigint=True, readrc=False).set_trace() (Pdb) continue """ |