Skip to content

Commit

Permalink
Update tests for jupyterhub#141: adding batchspawner-singleuser as wr…
Browse files Browse the repository at this point in the history
…apper

- This fixes up tests for jupyterhub#141, which adds batchspawner-singleuser
  which changes regular expressions that need to be matched in the
  batch scripts.
  • Loading branch information
rkdarst committed Jun 14, 2019
1 parent e6d4bfa commit ad6b010
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions batchspawner/tests/test_spawners.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ def test_torque(db, io_loop):
'req_epilogue': 'EPILOGUE',
}
batch_script_re_list = [
re.compile(r'^PROLOGUE.*^singleuser_command.*^EPILOGUE', re.S|re.M),
re.compile(r'^PROLOGUE.*^batchspawner-singleuser singleuser_command.*^EPILOGUE', re.S|re.M),
re.compile(r'mem=5678'),
re.compile(r'ppn=5'),
re.compile(r'^#PBS some_option_asdf', re.M),
Expand Down Expand Up @@ -315,7 +315,7 @@ def test_moab(db, io_loop):
'req_epilogue': 'EPILOGUE',
}
batch_script_re_list = [
re.compile(r'^PROLOGUE.*^singleuser_command.*^EPILOGUE', re.S|re.M),
re.compile(r'^PROLOGUE.*^batchspawner-singleuser singleuser_command.*^EPILOGUE', re.S|re.M),
re.compile(r'mem=5678'),
re.compile(r'ppn=5'),
re.compile(r'^#PBS some_option_asdf', re.M),
Expand Down Expand Up @@ -376,7 +376,7 @@ def test_slurm(db, io_loop):
'req_reservation': 'RES123',
}
batch_script_re_list = [
re.compile(r'PROLOGUE.*srun singleuser_command.*EPILOGUE', re.S),
re.compile(r'PROLOGUE.*srun batchspawner-singleuser singleuser_command.*EPILOGUE', re.S),
re.compile(r'^#SBATCH \s+ --cpus-per-task=5', re.X|re.M),
re.compile(r'^#SBATCH \s+ --time=3-05:10:10', re.X|re.M),
re.compile(r'^#SBATCH \s+ some_option_asdf', re.X|re.M),
Expand Down Expand Up @@ -441,7 +441,7 @@ def test_condor(db, io_loop):
'req_options': 'some_option_asdf',
}
batch_script_re_list = [
re.compile(r'exec singleuser_command'),
re.compile(r'exec batchspawner-singleuser singleuser_command'),
re.compile(r'RequestCpus = 5'),
re.compile(r'RequestMemory = 5678'),
re.compile(r'^some_option_asdf', re.M),
Expand Down Expand Up @@ -470,7 +470,7 @@ def test_lfs(db, io_loop):
'req_epilogue': 'EPILOGUE',
}
batch_script_re_list = [
re.compile(r'^PROLOGUE.*^singleuser_command.*^EPILOGUE', re.S|re.M),
re.compile(r'^PROLOGUE.*^batchspawner-singleuser singleuser_command.*^EPILOGUE', re.S|re.M),
re.compile(r'#BSUB\s+-q\s+some_queue', re.M),
]
script = [
Expand Down

0 comments on commit ad6b010

Please sign in to comment.