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

Function test_default_env

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

Source from the content-addressed store, hash-verified

85
86
87def test_default_env(hq_env: HqEnv):
88 env = {"FOO": "1"}
89 (job, client) = prepare_job_client(hq_env, default_env=env)
90
91 def fn():
92 assert os.environ["FOO"] == "1"
93
94 job.function(fn)
95 job_id = client.submit(job)
96 client.wait_for_jobs([job_id])
97
98
99def test_default_env_overwrite_default(hq_env: HqEnv):

Callers

nothing calls this directly

Calls 4

prepare_job_clientFunction · 0.85
functionMethod · 0.80
submitMethod · 0.45
wait_for_jobsMethod · 0.45

Tested by

no test coverage detected