From: Yury Selivanov Date: Thu, 14 May 2015 22:30:27 +0000 (-0400) Subject: inspect: Test that BoundArguments.__eq__ repects the order of params X-Git-Tag: v3.5.0b1~134 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4cfd4eac7d082b507a55535f90a7067f372c5e2d;p=python inspect: Test that BoundArguments.__eq__ repects the order of params --- diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py index 20df755a46..bbb7afa7ba 100644 --- a/Lib/test/test_inspect.py +++ b/Lib/test/test_inspect.py @@ -3133,6 +3133,12 @@ class TestBoundArguments(unittest.TestCase): 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)