diff --git a/tests/conftest.py b/tests/conftest.py index d1b4cd5..004a414 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -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", diff --git a/tests/io/test_slurm.py b/tests/io/test_slurm.py index bf1ee0a..edc7cee 100644 --- a/tests/io/test_slurm.py +++ b/tests/io/test_slurm.py @@ -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 --mail-user=test_email_address@email.address\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" + )