Use this to test bound methods or normal callables (things that don't expect self)
(o)
| 3300 | return signature |
| 3301 | |
| 3302 | def test_callable(o): |
| 3303 | """Use this to test bound methods or normal callables (things that don't expect self)""" |
| 3304 | signature = inspect.signature(o) |
| 3305 | self.assertTrue(isinstance(signature, inspect.Signature)) |
| 3306 | if signature.parameters: |
| 3307 | self.assertNotEqual(list(signature.parameters.values())[0].name, 'self') |
| 3308 | return signature |
| 3309 | |
| 3310 | signature = test_callable(_testcapi.docstring_with_signature_with_defaults) |
| 3311 | def p(name): return signature.parameters[name].default |
nothing calls this directly
no test coverage detected