mirror of
https://github.com/python/cpython.git
synced 2026-01-08 08:22:41 +00:00
inspect: Test that BoundArguments.__eq__ repects the order of params
This commit is contained in:
parent
8aad7f27a4
commit
4cfd4eac7d
1 changed files with 6 additions and 0 deletions
|
|
@ -3133,6 +3133,12 @@ def bar(b): pass
|
|||
ba4 = inspect.signature(bar).bind(1)
|
||||
self.assertNotEqual(ba, ba4)
|
||||
|
||||
def foo(*, a, b): pass
|
||||
sig = inspect.signature(foo)
|
||||
ba1 = sig.bind(a=1, b=2)
|
||||
ba2 = sig.bind(b=2, a=1)
|
||||
self.assertEqual(ba1, ba2)
|
||||
|
||||
def test_signature_bound_arguments_pickle(self):
|
||||
def foo(a, b, *, c:1={}, **kw) -> {42:'ham'}: pass
|
||||
sig = inspect.signature(foo)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue