MCPcopy Create free account
hub / github.com/RustPython/RustPython / _watch_for_survival

Method _watch_for_survival

Lib/test/test_logging.py:2221–2226  ·  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

2219 self._survivors = {}
2220
2221 def _watch_for_survival(self, *args):
2222 """Watch the given objects for survival, by creating weakrefs to
2223 them."""
2224 for obj in args:
2225 key = id(obj), repr(obj)
2226 self._survivors[key] = weakref.ref(obj)
2227
2228 def _assertTruesurvival(self):
2229 """Assert that all objects watched for survival have survived."""

Callers 1

Calls 2

idFunction · 0.85
reprFunction · 0.85

Tested by

no test coverage detected