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
Check the line number
  • Loading branch information
erlend-aasland committed Aug 9, 2023
commit cdf057442469080d48f51b01cb61e1706331a593
5 changes: 4 additions & 1 deletion Lib/test/test_clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2439,8 +2439,11 @@ def check_depr_star(self, pnames, fn, *args, **kwds):
fr"become( a)? keyword-only parameter(s)? in Python 3.14"
)
with self.assertWarnsRegex(DeprecationWarning, regex) as cm:
fn(*args, **kwds)
# Record the line number, so we're sure we've got the correct stack
# level on the deprecation warning.
_, lineno = fn(*args, **kwds), sys._getframe().f_lineno
Comment thread
erlend-aasland marked this conversation as resolved.
self.assertEqual(cm.filename, __file__)
self.assertEqual(cm.lineno, lineno)

def test_objects_converter(self):
with self.assertRaises(TypeError):
Expand Down