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

Method test_get_annotations

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

Source from the content-addressed store, hash-verified

2174 self.assertEqual(str(Signature.from_callable(lru.cache_clear)), '()')
2175
2176 def test_get_annotations(self):
2177 def orig(a: int) -> str: ...
2178 lru = self.module.lru_cache(1)(orig)
2179
2180 self.assertEqual(
2181 get_annotations(orig), {"a": int, "return": str},
2182 )
2183 self.assertEqual(
2184 get_annotations(lru), {"a": int, "return": str},
2185 )
2186
2187 def test_get_annotations_with_forwardref(self):
2188 def orig(a: int) -> nonexistent: ...

Callers

nothing calls this directly

Calls 2

get_annotationsFunction · 0.90
assertEqualMethod · 0.45

Tested by

no test coverage detected