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

Method test_common_signatures

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

Source from the content-addressed store, hash-verified

2135 self.assertIsNone(ref())
2136
2137 def test_common_signatures(self):
2138 def orig(a, /, b, c=True): ...
2139 lru = self.module.lru_cache(1)(orig)
2140
2141 self.assertEqual(str(Signature.from_callable(lru)), '(a, /, b, c=True)')
2142 self.assertEqual(str(Signature.from_callable(lru.cache_info)), '()')
2143 self.assertEqual(str(Signature.from_callable(lru.cache_clear)), '()')
2144
2145 def test_get_annotations(self):
2146 def orig(a: int) -> str: ...

Callers

nothing calls this directly

Calls 3

strFunction · 0.85
from_callableMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected