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

Method test_signatures

Lib/test/test_functools.py:3562–3571  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3560 self.assertIsNone(r())
3561
3562 def test_signatures(self):
3563 @functools.singledispatch
3564 def func(item, arg: int) -> str:
3565 return str(item)
3566 @func.register
3567 def _(item: int, arg: bytes) -> str:
3568 return str(item)
3569
3570 self.assertEqual(str(Signature.from_callable(func)),
3571 '(item, arg: int) -> str')
3572
3573 def test_method_signatures(self):
3574 class A:

Callers

nothing calls this directly

Calls 3

strFunction · 0.85
from_callableMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected