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

Function test_submit_pyfunction

tests/pyapi/test_function.py:16–26  ·  view source on GitHub ↗
(hq_env: HqEnv)

Source from the content-addressed store, hash-verified

14
15
16def test_submit_pyfunction(hq_env: HqEnv):
17 (job, client) = prepare_job_client(hq_env)
18
19 def body(a, b, c):
20 print(f"stdout {a} {b} {c}")
21
22 job.function(body, args=(1, 2), kwargs={"c": 3}, stdout="out", stderr="err")
23 submitted_job = client.submit(job)
24 wait_for_job_state(hq_env, submitted_job.id, "FINISHED")
25
26 check_file_contents("out", "stdout 1 2 3\n")
27
28
29def test_submit_python_prologue(hq_env: HqEnv):

Callers

nothing calls this directly

Calls 5

prepare_job_clientFunction · 0.85
wait_for_job_stateFunction · 0.85
functionMethod · 0.80
check_file_contentsFunction · 0.50
submitMethod · 0.45

Tested by

no test coverage detected