MCPcopy Create free account
hub / github.com/dask/dask / test_get_context_always_default

Function test_get_context_always_default

dask/tests/test_multiprocessing.py:301–306  ·  view source on GitHub ↗

On Python 2/Windows, get_context() always returns same context.

()

Source from the content-addressed store, hash-verified

299
300@pytest.mark.skipif(sys.platform != "win32", reason="POSIX supports different contexts")
301def test_get_context_always_default():
302 """On Python 2/Windows, get_context() always returns same context."""
303 assert get_context() is multiprocessing
304 with pytest.warns(UserWarning):
305 with dask.config.set({"multiprocessing.context": "forkserver"}):
306 assert get_context() is multiprocessing

Callers

nothing calls this directly

Calls 2

get_contextFunction · 0.90
setMethod · 0.80

Tested by

no test coverage detected