mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-36350: inspect: Replace OrderedDict with dict. (GH-12412)
This commit is contained in:
parent
0be3246d4f
commit
2cca8efe46
4 changed files with 39 additions and 29 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue