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

Method test_clear_traces

Lib/test/test_tracemalloc.py:268–275  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

266 self.assertEqual(tracemalloc.get_traced_memory(), (0, 0))
267
268 def test_clear_traces(self):
269 obj, obj_traceback = allocate_bytes(123)
270 traceback = tracemalloc.get_object_traceback(obj)
271 self.assertIsNotNone(traceback)
272
273 tracemalloc.clear_traces()
274 traceback2 = tracemalloc.get_object_traceback(obj)
275 self.assertIsNone(traceback2)
276
277 def test_reset_peak(self):
278 # Python allocates some internals objects, so the test must tolerate

Callers

nothing calls this directly

Calls 3

allocate_bytesFunction · 0.85
assertIsNotNoneMethod · 0.80
assertIsNoneMethod · 0.80

Tested by

no test coverage detected