MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_signatures

Method test_signatures

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

Source from the content-addressed store, hash-verified

3469 self.assertIsNone(r())
3470
3471 def test_signatures(self):
3472 @functools.singledispatch
3473 def func(item, arg: int) -> str:
3474 return str(item)
3475 @func.register
3476 def _(item: int, arg: bytes) -> str:
3477 return str(item)
3478
3479 self.assertEqual(str(Signature.from_callable(func)),
3480 '(item, arg: int) -> str')
3481
3482 def test_method_signatures(self):
3483 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