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

Function test_unpickleable

tests/test_worker.py:486–500  ·  view source on GitHub ↗
(arq_redis: ArqRedis, worker, caplog)

Source from the content-addressed store, hash-verified

484
485
486async def test_unpickleable(arq_redis: ArqRedis, worker, caplog):
487 caplog.set_level(logging.INFO)
488
489 class Foo:
490 pass
491
492 async def example(ctx):
493 return Foo()
494
495 await arq_redis.enqueue_job('example', _job_id='testing')
496 worker: Worker = worker(functions=[func(example, name='example')])
497 await worker.main()
498
499 log = re.sub(r'(\d+).\d\ds', r'\1.XXs', '\n'.join(r.message for r in caplog.records))
500 assert 'error serializing result of testing:example' in log
501
502
503async def test_log_health_check(arq_redis: ArqRedis, worker, caplog):

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…