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

Method test_traced_func_importing

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

Source from the content-addressed store, hash-verified

157 self.assertEqual(self.tracer.results().counts, expected)
158
159 def test_traced_func_importing(self):
160 self.tracer.runfunc(traced_func_importing, 2, 5)
161
162 firstlineno = get_firstlineno(traced_func_importing)
163 expected = {
164 (self.my_py_filename, firstlineno + 1): 1,
165 (fix_ext_py(testmod.__file__), 2): 1,
166 (fix_ext_py(testmod.__file__), 3): 1,
167 }
168
169 self.assertEqual(self.tracer.results().counts, expected)
170
171 @unittest.skipIf(os.environ.get('PYTHON_UOPS_OPTIMIZE') == '0',
172 "Line counts differ when JIT optimizer is disabled")

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected