MCPcopy Create free account
hub / github.com/python-arq/arq / test_job_error

Function test_job_error

tests/test_main.py:121–130  ·  view source on GitHub ↗
(arq_redis: ArqRedis, worker)

Source from the content-addressed store, hash-verified

119
120
121async def test_job_error(arq_redis: ArqRedis, worker):
122 async def foobar(ctx):
123 raise RuntimeError('foobar error')
124
125 j = await arq_redis.enqueue_job('foobar')
126 worker: Worker = worker(functions=[func(foobar, name='foobar')])
127 await worker.main()
128
129 with pytest.raises(RuntimeError, match='foobar error'):
130 await j.result(poll_delay=0)
131
132
133async def test_job_info(arq_redis: ArqRedis):

Callers

nothing calls this directly

Calls 5

funcFunction · 0.90
workerFunction · 0.85
enqueue_jobMethod · 0.80
mainMethod · 0.80
resultMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…