MCPcopy Create free account
hub / github.com/It4innovations/hyperqueue / test_get_failed_tasks

Function test_get_failed_tasks

tests/pyapi/test_job.py:129–146  ·  view source on GitHub ↗
(hq_env: HqEnv)

Source from the content-addressed store, hash-verified

127
128
129def test_get_failed_tasks(hq_env: HqEnv):
130 (job, client) = prepare_job_client(hq_env)
131
132 job.program(
133 args=bash("echo a"),
134 )
135 job.program(
136 args=bash("exit 1"),
137 )
138 job.program(
139 args=bash("echo b"),
140 )
141 job_id = client.submit(job)
142 assert not client.wait_for_jobs([job_id], raise_on_error=False)
143
144 errors = client.get_failed_tasks(job_id)
145 assert len(errors) == 1
146 assert errors[1].error == "Program terminated with exit code 1."
147
148
149def test_job_cpus_resources(hq_env: HqEnv):

Callers

nothing calls this directly

Calls 6

prepare_job_clientFunction · 0.85
bashFunction · 0.85
programMethod · 0.80
submitMethod · 0.45
wait_for_jobsMethod · 0.45
get_failed_tasksMethod · 0.45

Tested by

no test coverage detected