(hq_env: HqEnv)
| 37 | |
| 38 | |
| 39 | def test_pbs_queue_qsub_args(hq_env: HqEnv): |
| 40 | manager = ExtractSubmitScriptPath(PbsManagerFlavor().create_adapter()) |
| 41 | |
| 42 | with MockJobManager(hq_env, manager): |
| 43 | start_server_with_quick_refresh(hq_env) |
| 44 | prepare_tasks(hq_env) |
| 45 | |
| 46 | add_queue( |
| 47 | hq_env, |
| 48 | manager="pbs", |
| 49 | time_limit="3m", |
| 50 | additional_args="--foo=bar a b --baz 42", |
| 51 | ) |
| 52 | qsub_script_path = manager.get_script_path() |
| 53 | |
| 54 | with open(qsub_script_path) as f: |
| 55 | data = f.read() |
| 56 | pbs_args = extract_script_args(data, "#PBS") |
| 57 | assert pbs_args == [ |
| 58 | "-l select=1", |
| 59 | "-N hq-1-1", |
| 60 | f"-o {join(dirname(qsub_script_path), 'stdout')}", |
| 61 | f"-e {join(dirname(qsub_script_path), 'stderr')}", |
| 62 | "-l walltime=00:03:00", |
| 63 | "--foo=bar a b --baz 42", |
| 64 | ] |
| 65 | |
| 66 | |
| 67 | def test_slurm_queue_sbatch_args(hq_env: HqEnv): |
nothing calls this directly
no test coverage detected