MCPcopy
hub / github.com/celery/celery / test_trace_catches_exception

Method test_trace_catches_exception

t/unit/worker/test_request.py:1126–1134  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1124 assert R == repr(4 ** 4)
1125
1126 def test_trace_catches_exception(self):
1127
1128 @self.app.task(request=None, shared=False)
1129 def raising():
1130 raise KeyError('baz')
1131
1132 with pytest.warns(RuntimeWarning):
1133 res = trace_task(raising, uuid(), [], {}, app=self.app)[0]
1134 assert isinstance(res, ExceptionInfo)
1135
1136 def test_worker_task_trace_handle_retry(self):
1137 tid = uuid()

Callers

nothing calls this directly

Calls 1

trace_taskFunction · 0.90

Tested by

no test coverage detected