MCPcopy
hub / github.com/celery/celery / test_should_terminate

Method test_should_terminate

t/unit/worker/test_loops.py:218–227  ·  view source on GitHub ↗
(self, should_stop)

Source from the content-addressed store, hash-verified

216
217 @pytest.mark.parametrize('should_stop', (None, False, True, EX_OK))
218 def test_should_terminate(self, should_stop):
219 x = X(self.app)
220 state.should_stop = should_stop
221 state.should_terminate = True
222 try:
223 with pytest.raises(WorkerTerminate):
224 asynloop(*x.args)
225 finally:
226 state.should_stop = None
227 state.should_terminate = None
228
229 def test_should_terminate_hub_close_raises(self):
230 x = X(self.app)

Callers

nothing calls this directly

Calls 3

asynloopFunction · 0.90
XClass · 0.70
raisesMethod · 0.45

Tested by

no test coverage detected