Skip to content

Commit

Permalink
Add example case
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs committed Aug 7, 2024
1 parent c0b62f5 commit 531e6ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ def test_utils():
def maximalist_qresources():
"""A set of QResources options that try to make use of most features"""
from qtoolkit.core.data_objects import QResources

return QResources(
queue_name="test_queue",
job_name="test_job",
Expand Down
6 changes: 5 additions & 1 deletion tests/io/test_slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,4 +279,8 @@ def test_submission_script(self, slurm_io, maximalist_qresources):
script_qresources = slurm_io.get_submission_script(
commands=["ls -l"], options=maximalist_qresources
)
assert script_qresources
assert script_qresources.split(
"\n"
) == "#!/bin/bash\n\n#SBATCH --partition=test_queue\n#SBATCH --job-name=test_job\n#SBATCH --nodes=1\n#SBATCH --ntasks=1\n#SBATCH --ntasks-per-node=1\n#SBATCH --cpus-per-task=1\n#SBATCH --mem-per-cpu=1000\n#SBATCH --time=0-0:1:40\n#SBATCH --account=test_account\n#SBATCH [email protected]\n#SBATCH --mail-type=ALL\n#SBATCH --gres=gpu:1\n#SBATCH --output=test_output_filepath\n#SBATCH --error=test_error_filepath\n#SBATCH --qos=test_qos\n#SBATCH --priority=1\nls -l".split(
"\n"
)

0 comments on commit 531e6ef

Please sign in to comment.