ยปCore Development>Code coverage>Lib/test/mp_preload.py

Python code coverage for Lib/test/mp_preload.py

#countcontent
1n/aimport multiprocessing
2n/a
3n/amultiprocessing.Lock()
4n/a
5n/a
6n/adef f():
7n/a print("ok")
8n/a
9n/a
10n/aif __name__ == "__main__":
11n/a ctx = multiprocessing.get_context("forkserver")
12n/a modname = "test.mp_preload"
13n/a # Make sure it's importable
14n/a __import__(modname)
15n/a ctx.set_forkserver_preload([modname])
16n/a proc = ctx.Process(target=f)
17n/a proc.start()
18n/a proc.join()