Skip to content

Commit ad6b010

Browse files
committed
Update tests for #141: adding batchspawner-singleuser as wrapper
- This fixes up tests for #141, which adds batchspawner-singleuser which changes regular expressions that need to be matched in the batch scripts.
1 parent e6d4bfa commit ad6b010

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

batchspawner/tests/test_spawners.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def test_torque(db, io_loop):
287287
'req_epilogue': 'EPILOGUE',
288288
}
289289
batch_script_re_list = [
290-
re.compile(r'^PROLOGUE.*^singleuser_command.*^EPILOGUE', re.S|re.M),
290+
re.compile(r'^PROLOGUE.*^batchspawner-singleuser singleuser_command.*^EPILOGUE', re.S|re.M),
291291
re.compile(r'mem=5678'),
292292
re.compile(r'ppn=5'),
293293
re.compile(r'^#PBS some_option_asdf', re.M),
@@ -315,7 +315,7 @@ def test_moab(db, io_loop):
315315
'req_epilogue': 'EPILOGUE',
316316
}
317317
batch_script_re_list = [
318-
re.compile(r'^PROLOGUE.*^singleuser_command.*^EPILOGUE', re.S|re.M),
318+
re.compile(r'^PROLOGUE.*^batchspawner-singleuser singleuser_command.*^EPILOGUE', re.S|re.M),
319319
re.compile(r'mem=5678'),
320320
re.compile(r'ppn=5'),
321321
re.compile(r'^#PBS some_option_asdf', re.M),
@@ -376,7 +376,7 @@ def test_slurm(db, io_loop):
376376
'req_reservation': 'RES123',
377377
}
378378
batch_script_re_list = [
379-
re.compile(r'PROLOGUE.*srun singleuser_command.*EPILOGUE', re.S),
379+
re.compile(r'PROLOGUE.*srun batchspawner-singleuser singleuser_command.*EPILOGUE', re.S),
380380
re.compile(r'^#SBATCH \s+ --cpus-per-task=5', re.X|re.M),
381381
re.compile(r'^#SBATCH \s+ --time=3-05:10:10', re.X|re.M),
382382
re.compile(r'^#SBATCH \s+ some_option_asdf', re.X|re.M),
@@ -441,7 +441,7 @@ def test_condor(db, io_loop):
441441
'req_options': 'some_option_asdf',
442442
}
443443
batch_script_re_list = [
444-
re.compile(r'exec singleuser_command'),
444+
re.compile(r'exec batchspawner-singleuser singleuser_command'),
445445
re.compile(r'RequestCpus = 5'),
446446
re.compile(r'RequestMemory = 5678'),
447447
re.compile(r'^some_option_asdf', re.M),
@@ -470,7 +470,7 @@ def test_lfs(db, io_loop):
470470
'req_epilogue': 'EPILOGUE',
471471
}
472472
batch_script_re_list = [
473-
re.compile(r'^PROLOGUE.*^singleuser_command.*^EPILOGUE', re.S|re.M),
473+
re.compile(r'^PROLOGUE.*^batchspawner-singleuser singleuser_command.*^EPILOGUE', re.S|re.M),
474474
re.compile(r'#BSUB\s+-q\s+some_queue', re.M),
475475
]
476476
script = [

0 commit comments

Comments
 (0)