MCPcopy Index your code
hub / github.com/python/cpython / call

Method call

Lib/test/test_inspect/test_inspect.py:5640–5647  ·  view source on GitHub ↗
(func, *args, **kwargs)

Source from the content-addressed store, hash-verified

5638class TestSignatureBind(unittest.TestCase):
5639 @staticmethod
5640 def call(func, *args, **kwargs):
5641 sig = inspect.signature(func)
5642 ba = sig.bind(*args, **kwargs)
5643 # Prevent unexpected success of assertRaises(TypeError, ...)
5644 try:
5645 return func(*ba.args, **ba.kwargs)
5646 except TypeError as e:
5647 raise AssertionError from e
5648
5649 def test_signature_bind_empty(self):
5650 def test():

Calls 3

funcFunction · 0.50
signatureMethod · 0.45
bindMethod · 0.45

Tested by

no test coverage detected