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

Function test_set_env

tests/test_job.py:522–543  ·  view source on GitHub ↗
(hq_env: HqEnv)

Source from the content-addressed store, hash-verified

520
521
522def test_set_env(hq_env: HqEnv):
523 hq_env.start_server()
524 hq_env.start_workers(1)
525 hq_env.command(
526 [
527 "submit",
528 "--env",
529 "FOO=BAR",
530 "--env",
531 "FOO2=BAR2",
532 "--",
533 "bash",
534 "-c",
535 "echo $FOO $FOO2",
536 ]
537 )
538 wait_for_job_state(hq_env, 1, "FINISHED")
539
540 check_file_contents(os.path.join(hq_env.work_path, default_task_output()), "BAR BAR2\n")
541
542 table = hq_env.command(["job", "info", "1"], as_table=True)
543 table.check_row_value("Environment", "FOO=BAR\nFOO2=BAR2")
544
545
546def test_max_fails_0(hq_env: HqEnv):

Callers

nothing calls this directly

Calls 7

wait_for_job_stateFunction · 0.85
default_task_outputFunction · 0.85
commandMethod · 0.80
check_row_valueMethod · 0.80
check_file_contentsFunction · 0.50
start_serverMethod · 0.45
start_workersMethod · 0.45

Tested by

no test coverage detected