@pytest.mark.skipif(u'not PY3_4 or sys.platform == "win32" or sys.platform.startswith("gnu0")')
def test_multiprocessing_forkserver():
 import multiprocessing
 ctx = multiprocessing.get_context(u'forkserver')
 pool = ctx.Pool(1)
 result = pool.map(_square, [1, 2, 3, 4, 5])
 pool.close()
 pool.join()
 assert (result == [1, 4, 9, 16, 25])

@ pytest . mark . skipif ( u'not PY3_4 or sys.platform == "win32" or sys.platform.startswith("gnu0")' ) def test_multiprocessing_forkserver ( ) : import multiprocessing ctx = multiprocessing . get_context ( u'forkserver' ) pool = ctx . Pool ( 1 ) result = pool . map ( _square , [ 1 , 2 , 3 , 4 , 5 ] ) pool . close ( ) pool . join ( ) assert ( result == [ 1 , 4 , 9 , 16 , 25 ] )
test that using multiprocessing with forkserver works .