MCPcopy Create free account
hub / github.com/pytest-dev/pytest / Class

Class Class

testing/test_compat.py:197–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

195 ncalls = 0
196
197 class Class:
198 @cached_property
199 def prop(self) -> int:
200 nonlocal ncalls
201 ncalls += 1
202 return ncalls
203
204 c1 = Class()
205 assert ncalls == 0

Callers 1

test_cached_propertyFunction · 0.70

Calls

no outgoing calls

Tested by 1

test_cached_propertyFunction · 0.56