gh-101517: fix line number propagation in code generated for except* (#103550)

This commit is contained in:
Irit Katriel 2023-04-24 14:58:51 -06:00 committed by GitHub
parent 518050ced1
commit 1c01f8d797
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 27 additions and 15 deletions

View file

@ -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__":