8000 gh-95065: Argument Clinic: Add functional tests of deprecated positionals by erlend-aasland · Pull Request #107768 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-95065: Argument Clinic: Add functional tests of deprecated positionals #107768

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 16 commits into from
Aug 10, 2023
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
self.assertEqual(cm.filename, __file__)
self.assertEqual(cm.lineno, lineno)

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