Visitar URL original
gh-87106: Fix `inspect.signature.bind` handling of positional-only arguments with `**kwargs` by jacobtylerwalls · Pull Request #103404 · python/cpython · GitHub
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
Add test cases
  • Loading branch information
jacobtylerwalls committed May 5, 2024
commit 2f792eb04bd600e731d034fab513cd45b0470767
6 changes: 6 additions & 0 deletions Lib/test/test_inspect/test_inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -5075,6 +5075,12 @@ def test(a_po, b_po, c_po=3, /, foo=42, *, bar=50, **kwargs):
self.assertEqual(self.call(test, 1, 2, foo=4, bar=5, c_po=10),
Comment thread
sobolevn marked this conversation as resolved.
(1, 2, 3, 4, 5, {'c_po': 10}))

self.assertEqual(self.call(test, 1, 2, 3, c_po=10, foo=4, bar=5),
Comment thread
jacobtylerwalls marked this conversation as resolved.
Outdated
(1, 2, 3, 4, 5, {'c_po': 10}))

self.assertEqual(self.call(test, 1, 2, 3, foo=4, bar=5, c_po=10),
Comment thread
jacobtylerwalls marked this conversation as resolved.
Outdated
(1, 2, 3, 4, 5, {'c_po': 10}))

self.assertEqual(self.call(test, 1, 2, c_po=4),
(1, 2, 3, 42, 50, {'c_po': 4}))

Expand Down