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

Function test_deserialization_error

tests/test_worker.py:723–728  ·  view source on GitHub ↗
(arq_redis: ArqRedis, worker)

Source from the content-addressed store, hash-verified

721
722@pytest.mark.skipif(sys.version_info < (3, 7), reason='repr(exc) is ugly in 3.6')
723async def test_deserialization_error(arq_redis: ArqRedis, worker):
724 await arq_redis.enqueue_job('foobar', UnpickleFails('hello'), _job_id='job_id')
725 worker: Worker = worker(functions=[foobar])
726 with pytest.raises(FailedJobs) as exc_info:
727 await worker.run_check()
728 assert str(exc_info.value) == "1 job failed DeserializationError('unable to deserialize job')"
729
730
731async def test_incompatible_serializers_1(arq_redis_msgpack: ArqRedis, worker):

Callers

nothing calls this directly

Calls 4

UnpickleFailsClass · 0.85
workerFunction · 0.85
enqueue_jobMethod · 0.80
run_checkMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…