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

Method fork_child

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

Source from the content-addressed store, hash-verified

342 self.assertEqual(snapshot2.test_attr, "new")
343
344 def fork_child(self):
345 if not tracemalloc.is_tracing():
346 return 2
347
348 obj_size = 12345
349 obj, obj_traceback = allocate_bytes(obj_size)
350 traceback = tracemalloc.get_object_traceback(obj)
351 if traceback is None:
352 return 3
353
354 # everything is fine
355 return 0
356
357 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
358 @support.requires_fork()

Callers 1

test_forkMethod · 0.95

Calls 1

allocate_bytesFunction · 0.85

Tested by

no test coverage detected