MCPcopy
hub / github.com/celery/celery / AAA_disable_multiprocessing

Function AAA_disable_multiprocessing

t/unit/conftest.py:129–145  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

127
128@pytest.fixture(autouse=True, scope='session')
129def AAA_disable_multiprocessing():
130 # pytest-cov breaks if a multiprocessing.Process is started,
131 # so disable them completely to make sure it doesn't happen.
132 stuff = [
133 'multiprocessing.Process',
134 'billiard.Process',
135 'billiard.context.Process',
136 'billiard.process.Process',
137 'billiard.process.BaseProcess',
138 'multiprocessing.Process',
139 ]
140 ctxs = [patch(s) for s in stuff]
141 [ctx.__enter__() for ctx in ctxs]
142
143 yield
144
145 [ctx.__exit__(*sys.exc_info()) for ctx in ctxs]
146
147
148def alive_threads():

Callers

nothing calls this directly

Calls 2

__enter__Method · 0.45
__exit__Method · 0.45

Tested by

no test coverage detected