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

Method find_trace

Lib/test/test_tracemalloc.py:180–187  ·  view source on GitHub ↗
(self, traces, traceback, size)

Source from the content-addressed store, hash-verified

178 self.assertEqual(traceback, obj_traceback)
179
180 def find_trace(self, traces, traceback, size):
181 # filter also by size to ignore the memory allocated by
182 # _PyRefchain_Trace() if Python is built with Py_TRACE_REFS.
183 for trace in traces:
184 if trace[2] == traceback._frames and trace[1] == size:
185 return trace
186
187 self.fail("trace not found")
188
189 def test_get_traces(self):
190 tracemalloc.clear_traces()

Callers 2

test_get_tracesMethod · 0.95

Calls 1

failMethod · 0.45

Tested by

no test coverage detected