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

Method test_task_failed

t/integration/test_tasks.py:804–817  ·  view source on GitHub ↗
(self, caplog)

Source from the content-addressed store, hash-verified

802
803 @flaky
804 def test_task_failed(self, caplog):
805 result = self.call_task_with_reprs(fail.s(2, 2))
806 with pytest.raises(ExpectedException):
807 result.get(timeout=5)
808 assert result.failed() is True
809
810 self.assert_trace_log(caplog, result, [
811 ('celery.worker.strategy', logging.INFO,
812 celery.app.trace.LOG_RECEIVED,
813 ),
814 ('celery.app.trace', logging.ERROR,
815 celery.app.trace.LOG_FAILURE,
816 ),
817 ])
818
819
820class test_task_redis_result_backend:

Callers

nothing calls this directly

Calls 6

call_task_with_reprsMethod · 0.95
assert_trace_logMethod · 0.95
raisesMethod · 0.80
sMethod · 0.45
getMethod · 0.45
failedMethod · 0.45

Tested by

no test coverage detected