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

Function test_deploy_ssh_multiple_workers

tests/test_worker.py:380–394  ·  view source on GitHub ↗
(hq_env: HqEnv)

Source from the content-addressed store, hash-verified

378
379
380def test_deploy_ssh_multiple_workers(hq_env: HqEnv):
381 hq_env.start_server()
382 with hq_env.mock.mock_program_with_code(
383 "ssh",
384 """
385import os
386
387os.makedirs("workers", exist_ok=True)
388with open(f"workers/{os.getpid()}", "w") as f:
389 f.write(str(os.getpid()))
390""",
391 ):
392 nodefile = prepare_localhost_nodefile(count=3)
393 hq_env.command(["worker", "deploy-ssh", nodefile])
394 assert len(os.listdir("workers")) == 3
395
396
397def test_deploy_ssh_show_output(hq_env: HqEnv):

Callers

nothing calls this directly

Calls 4

commandMethod · 0.80
start_serverMethod · 0.45

Tested by

no test coverage detected