MCPcopy Create free account
hub / github.com/celery/celery / test_create_forking_enable_spawn

Method test_create_forking_enable_spawn

t/unit/worker/test_components.py:96–106  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

94 assert comp.instantiate.call_args[1]['forking_enable'] is True
95
96 def test_create_forking_enable_spawn(self):
97 w = Mock()
98 w.use_eventloop = False
99 w.pool_putlocks = w.pool_cls.uses_semaphore = True
100 w.pool_start_method = 'spawn'
101 comp = Pool(w)
102 comp.instantiate = Mock()
103
104 comp.create(w)
105
106 assert comp.instantiate.call_args[1]['forking_enable'] is False
107
108 @t.skip.if_win32
109 def test_create_spawn_with_async_pool(self):

Callers

nothing calls this directly

Calls 2

createMethod · 0.95
PoolClass · 0.90

Tested by

no test coverage detected