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

Method test_fork

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

Source from the content-addressed store, hash-verified

357 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
358 @support.requires_fork()
359 def test_fork(self):
360 # check that tracemalloc is still working after fork
361 pid = os.fork()
362 if not pid:
363 # child
364 exitcode = 1
365 try:
366 exitcode = self.fork_child()
367 finally:
368 os._exit(exitcode)
369 else:
370 support.wait_process(pid, exitcode=0)
371
372 def test_no_incomplete_frames(self):
373 tracemalloc.stop()

Callers

nothing calls this directly

Calls 2

fork_childMethod · 0.95
_exitMethod · 0.45

Tested by

no test coverage detected