[Python-checkins] cpython: inspect: Test that BoundArguments.__eq__ repects the order of params
yury.selivanov
python-checkins at python.org
Fri May 15 00:33:35 CEST 2015
https://hg.python.org/cpython/rev/5a40fb5ad890
changeset: 96057:5a40fb5ad890
parent: 96054:15701e89d710
user: Yury Selivanov <yselivanov at sprymix.com>
date: Thu May 14 18:30:27 2015 -0400
summary:
inspect: Test that BoundArguments.__eq__ repects the order of params
files:
Lib/test/test_inspect.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py
--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -3133,6 +3133,12 @@
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)
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list