summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_inspect.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_inspect.py')
-rw-r--r--Lib/test/test_inspect.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py
index d95e742..8a2efc8 100644
--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -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):