Python code coverage for Lib/test/mp_preload.py
# | count | content |
---|---|---|
1 | n/a | import multiprocessing |
2 | n/a | |
3 | n/a | multiprocessing.Lock() |
4 | n/a | |
5 | n/a | |
6 | n/a | def f(): |
7 | n/a | print("ok") |
8 | n/a | |
9 | n/a | |
10 | n/a | if __name__ == "__main__": |
11 | n/a | ctx = multiprocessing.get_context("forkserver") |
12 | n/a | modname = "test.mp_preload" |
13 | n/a | # Make sure it's importable |
14 | n/a | __import__(modname) |
15 | n/a | ctx.set_forkserver_preload([modname]) |
16 | n/a | proc = ctx.Process(target=f) |
17 | n/a | proc.start() |
18 | n/a | proc.join() |