bpo-36350: inspect: Replace OrderedDict with dict. (GH-12412)

This commit is contained in:
Rémi Lapeyre 2020-01-28 13:47:03 +01:00 committed by Inada Naoki
parent 0be3246d4f
commit 2cca8efe46
4 changed files with 39 additions and 29 deletions

View file

@ -2077,6 +2077,7 @@ class TestSignatureObject(unittest.TestCase):
P = inspect.Parameter
self.assertEqual(str(S()), '()')
self.assertEqual(repr(S().parameters), 'mappingproxy({})')
def test(po, pk, pod=42, pkd=100, *args, ko, **kwargs):
pass
@ -3681,6 +3682,10 @@ class TestBoundArguments(unittest.TestCase):
ba.apply_defaults()
self.assertEqual(list(ba.arguments.items()), [('a', 'spam')])
def test_signature_bound_arguments_arguments_type(self):
def foo(a): pass
ba = inspect.signature(foo).bind(1)
self.assertIs(type(ba.arguments), dict)
class TestSignaturePrivateHelpers(unittest.TestCase):
def test_signature_get_bound_param(self):