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

Method tearDown

Lib/test/test_gc.py:1274–1289  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1272 self.othergarbage = []
1273
1274 def tearDown(self):
1275 # Restore gc state
1276 del self.visit
1277 gc.callbacks.remove(self.cb1)
1278 gc.callbacks.remove(self.cb2)
1279 gc.set_debug(self.debug)
1280 if self.enabled:
1281 gc.enable()
1282 # destroy any uncollectables
1283 gc.collect()
1284 for obj in gc.garbage:
1285 if isinstance(obj, Uncollectable):
1286 obj.partner = None
1287 del gc.garbage[:]
1288 del self.othergarbage
1289 gc.collect()
1290
1291 def preclean(self):
1292 # Remove all fluff from the system. Invoke this function

Callers

nothing calls this directly

Calls 4

removeMethod · 0.45
set_debugMethod · 0.45
enableMethod · 0.45
collectMethod · 0.45

Tested by

no test coverage detected