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

Method setUp

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

Source from the content-addressed store, hash-verified

126class TestLineCounts(unittest.TestCase):
127 """White-box testing of line-counting, via runfunc"""
128 def setUp(self):
129 self.addCleanup(sys.settrace, sys.gettrace())
130 self.tracer = Trace(count=1, trace=0, countfuncs=0, countcallers=0)
131 self.my_py_filename = fix_ext_py(__file__)
132
133 def test_traced_func_linear(self):
134 result = self.tracer.runfunc(traced_func_linear, 2, 5)

Callers

nothing calls this directly

Calls 3

TraceClass · 0.90
fix_ext_pyFunction · 0.85
addCleanupMethod · 0.80

Tested by

no test coverage detected