(hq_env: HqEnv)
| 65 | |
| 66 | |
| 67 | def test_slurm_queue_sbatch_args(hq_env: HqEnv): |
| 68 | manager = ExtractSubmitScriptPath(SlurmManagerFlavor().create_adapter()) |
| 69 | |
| 70 | with MockJobManager(hq_env, manager): |
| 71 | start_server_with_quick_refresh(hq_env) |
| 72 | prepare_tasks(hq_env) |
| 73 | |
| 74 | add_queue( |
| 75 | hq_env, |
| 76 | manager="slurm", |
| 77 | time_limit="3m", |
| 78 | additional_args="--foo=bar a b --baz 42", |
| 79 | ) |
| 80 | sbatch_script_path = manager.get_script_path() |
| 81 | with open(sbatch_script_path) as f: |
| 82 | data = f.read() |
| 83 | slurm_args = extract_script_args(data, "#SBATCH") |
| 84 | assert slurm_args == [ |
| 85 | "--nodes=1", |
| 86 | "--job-name=hq-1-1", |
| 87 | f"--output={join(dirname(sbatch_script_path), 'stdout')}", |
| 88 | f"--error={join(dirname(sbatch_script_path), 'stderr')}", |
| 89 | "--time=00:03:00", |
| 90 | "--foo=bar a b --baz 42", |
| 91 | ] |
| 92 | |
| 93 | |
| 94 | def test_slurm_queue_sbatch_additional_output(hq_env: HqEnv): |
nothing calls this directly
no test coverage detected