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

Method setUp

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

Source from the content-addressed store, hash-verified

334class TestCallers(unittest.TestCase):
335 """White-box testing of callers tracing"""
336 def setUp(self):
337 self.addCleanup(sys.settrace, sys.gettrace())
338 self.tracer = Trace(count=0, trace=0, countcallers=1)
339 self.filemod = my_file_and_modname()
340
341 @unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
342 'pre-existing trace function throws off measurements')

Callers

nothing calls this directly

Calls 3

TraceClass · 0.90
my_file_and_modnameFunction · 0.85
addCleanupMethod · 0.80

Tested by

no test coverage detected