MCPcopy
hub / github.com/pex-tool/pex / test_multiprocessing_identity_preserved

Function test_multiprocessing_identity_preserved

tests/test_enum.py:122–134  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

120
121
122def test_multiprocessing_identity_preserved():
123 # type: () -> None
124
125 # N.B.: Multiprocessing uses pickle; so this test is redundant to the test above, but it is more
126 # on point since we directly use multiprocessing and no-where use pickle.
127
128 pool = multiprocessing.Pool()
129 try:
130 for input_, output in zip(Color.values(), pool.map(_identity, Color.values())):
131 assert input_ is output
132 finally:
133 pool.close()
134 pool.join()

Callers

nothing calls this directly

Calls 4

closeMethod · 0.95
joinMethod · 0.95
mapMethod · 0.80
valuesMethod · 0.45

Tested by

no test coverage detected