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

Method _watch_for_survival

Lib/test/test_logging.py:2247–2252  ·  view source on GitHub ↗

Watch the given objects for survival, by creating weakrefs to them.

(self, *args)

Source from the content-addressed store, hash-verified

2245 self._survivors = {}
2246
2247 def _watch_for_survival(self, *args):
2248 """Watch the given objects for survival, by creating weakrefs to
2249 them."""
2250 for obj in args:
2251 key = id(obj), repr(obj)
2252 self._survivors[key] = weakref.ref(obj)
2253
2254 def _assertTruesurvival(self):
2255 """Assert that all objects watched for survival have survived."""

Callers 1

Calls 1

idFunction · 0.85

Tested by

no test coverage detected