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

Method test_common_signatures

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

Source from the content-addressed store, hash-verified

2166 self.assertIsNone(ref())
2167
2168 def test_common_signatures(self):
2169 def orig(a, /, b, c=True): ...
2170 lru = self.module.lru_cache(1)(orig)
2171
2172 self.assertEqual(str(Signature.from_callable(lru)), '(a, /, b, c=True)')
2173 self.assertEqual(str(Signature.from_callable(lru.cache_info)), '()')
2174 self.assertEqual(str(Signature.from_callable(lru.cache_clear)), '()')
2175
2176 def test_get_annotations(self):
2177 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