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

Method test_proxy_reuse

Lib/test/test_weakref.py:292–298  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

290 "wrong weak ref count for object after deleting proxy")
291
292 def test_proxy_reuse(self):
293 o = C()
294 proxy1 = weakref.proxy(o)
295 ref = weakref.ref(o)
296 proxy2 = weakref.proxy(o)
297 self.assertIs(proxy1, proxy2,
298 "proxy object w/out callback should have been re-used")
299
300 def test_basic_proxy(self):
301 o = C()

Callers

nothing calls this directly

Calls 3

proxyMethod · 0.80
CClass · 0.70
assertIsMethod · 0.45

Tested by

no test coverage detected