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

Method setUp

Lib/test/test_tracemalloc.py:1005–1015  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1003 maxDiff = 80 * 20
1004
1005 def setUp(self):
1006 if tracemalloc.is_tracing():
1007 self.skipTest("tracemalloc must be stopped before the test")
1008
1009 self.domain = 5
1010 self.size = 123
1011 self.obj = allocate_bytes(self.size)[0]
1012
1013 # for the type "object", id(obj) is the address of its memory block.
1014 # This type is not tracked by the garbage collector
1015 self.ptr = id(self.obj)
1016
1017 def tearDown(self):
1018 tracemalloc.stop()

Callers

nothing calls this directly

Calls 3

allocate_bytesFunction · 0.85
idFunction · 0.85
skipTestMethod · 0.80

Tested by

no test coverage detected