Skip to content

Commit 4adcbfc

Browse files
committed
Merge branch 'fix/slurm_extra' of github.com:snakemake/snakemake-executor-plugin-slurm into fix/slurm_extra
2 parents 03d9b18 + 7900d48 commit 4adcbfc

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tests/tests.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -712,42 +712,42 @@ def test_valid_slurm_extra(self, mock_job):
712712
def test_forbidden_job_name_long_form(self, mock_job):
713713
"""Test that --job-name is rejected."""
714714
job = mock_job(slurm_extra="--job-name=my-job --mail-type=END")
715-
with pytest.raises(WorkflowError, match="job-name.*not allowed"):
715+
with pytest.raises(WorkflowError, match=r"job-name.*not allowed"):
716716
validate_slurm_extra(job)
717717

718718
def test_forbidden_job_name_short_form(self, mock_job):
719719
"""Test that -J is rejected."""
720720
job = mock_job(slurm_extra="-J my-job --mail-type=END")
721-
with pytest.raises(WorkflowError, match="job-name.*not allowed"):
721+
with pytest.raises(WorkflowError, match=r"job-name.*not allowed"):
722722
validate_slurm_extra(job)
723723

724724
def test_forbidden_account_long_form(self, mock_job):
725725
"""Test that --account is rejected."""
726726
job = mock_job(slurm_extra="--account=myaccount --mail-type=END")
727-
with pytest.raises(WorkflowError, match="account.*not allowed"):
727+
with pytest.raises(WorkflowError, match=r"account.*not allowed"):
728728
validate_slurm_extra(job)
729729

730730
def test_forbidden_account_short_form(self, mock_job):
731731
"""Test that -A is rejected."""
732732
job = mock_job(slurm_extra="-A myaccount --mail-type=END")
733-
with pytest.raises(WorkflowError, match="account.*not allowed"):
733+
with pytest.raises(WorkflowError, match=r"account.*not allowed"):
734734
validate_slurm_extra(job)
735735

736736
def test_forbidden_comment(self, mock_job):
737737
"""Test that --comment is rejected."""
738738
job = mock_job(slurm_extra="--comment='my comment' --mail-type=END")
739-
with pytest.raises(WorkflowError, match="job-comment.*not allowed"):
739+
with pytest.raises(WorkflowError, match=r"job-comment.*not allowed"):
740740
validate_slurm_extra(job)
741741

742742
def test_forbidden_gres(self, mock_job):
743743
"""Test that --gres is rejected."""
744744
job = mock_job(slurm_extra="--gres=gpu:1 --mail-type=END")
745-
with pytest.raises(WorkflowError, match="generic-resources.*not allowed"):
745+
with pytest.raises(WorkflowError, match=r"generic-resources.*not allowed"):
746746
validate_slurm_extra(job)
747747

748748
def test_multiple_forbidden_options(self, mock_job):
749749
"""Test that the first forbidden option found is reported."""
750750
job = mock_job(slurm_extra="--job-name=test --account=myaccount")
751751
# Should raise error for job-name (first one encountered)
752-
with pytest.raises(WorkflowError, match="job-name.*not allowed"):
752+
with pytest.raises(WorkflowError, match=r"job-name.*not allowed"):
753753
validate_slurm_extra(job)

0 commit comments

Comments
 (0)