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

Method test_loop_caller_importing

Lib/test/test_trace.py:296–306  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

294 self.tracer.runfunc()
295
296 def test_loop_caller_importing(self):
297 self.tracer.runfunc(traced_func_importing_caller, 1)
298
299 expected = {
300 self.filemod + ('traced_func_simple_caller',): 1,
301 self.filemod + ('traced_func_linear',): 1,
302 self.filemod + ('traced_func_importing_caller',): 1,
303 self.filemod + ('traced_func_importing',): 1,
304 (fix_ext_py(testmod.__file__), 'testmod', 'func'): 1,
305 }
306 self.assertEqual(self.tracer.results().calledfuncs, expected)
307
308 @unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
309 'pre-existing trace function throws off measurements')

Callers

nothing calls this directly

Calls 4

fix_ext_pyFunction · 0.85
runfuncMethod · 0.80
resultsMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected