(hq_env: HqEnv)
| 45 | |
| 46 | |
| 47 | def test_submit_pyfunction_fail(hq_env: HqEnv): |
| 48 | (job, client) = prepare_job_client(hq_env) |
| 49 | |
| 50 | def body(): |
| 51 | raise Exception("MyException") |
| 52 | |
| 53 | job.function(body, stderr="err") |
| 54 | job_id = client.submit(job) |
| 55 | client.wait_for_jobs([job_id], raise_on_error=False) |
| 56 | errors = client.get_failed_tasks(job_id) |
| 57 | assert list(errors.keys()) == [0] |
| 58 | assert errors[0].error.endswith(' raise Exception("MyException")\nException: MyException\n') |
| 59 | assert errors[0].stderr == os.path.abspath("err") |
| 60 | |
| 61 | |
| 62 | def test_function_resources(hq_env: HqEnv): |
nothing calls this directly
no test coverage detected