Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Lib/test/test_capi/test_exceptions.py
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
  • Loading branch information
Eclips4 and serhiy-storchaka authored May 16, 2024
commit f75f5cb287c469e1bdeabfce33ace1ff6a6da2a1
8 changes: 3 additions & 5 deletions Lib/test/test_capi/test_exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,12 @@ def foo():
''')
proc = assert_python_ok("-c", code)
warnings = proc.err.splitlines()
expected = [
self.assertEqual(warnings, [
b'<string>:6: RuntimeWarning: Testing PyErr_WarnEx',
b' foo() # line 6',
b'<string>:9: RuntimeWarning: Testing PyErr_WarnEx',
b' foo() # line 9'
]
self.assertEqual(len(warnings), 4)
self.assertEqual(warnings, expected)
b' foo() # line 9',
])

def test_warn_during_finalization(self):
code = textwrap.dedent('''\
Expand Down