Skip to content

Commit 38a8ed0

Browse files
authored
Fix test
1 parent d5dc7da commit 38a8ed0

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

tests/tests.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def test_valid_gres_format_gpu_model(self, mock_job):
291291
process_mock.returncode = 0
292292
mock_popen.return_value = process_mock
293293

294-
assert set_gres_string(job) == " --gres=tesla:1"
294+
assert set_gres_string(job) == " --gres=gpu:tesla"
295295

296296
def test_valid_gpu_number(self, mock_job):
297297
"""Test with valid GPU number."""
@@ -389,11 +389,7 @@ def test_both_gres_and_gpu_set(self, mock_job):
389389
process_mock.returncode = 0
390390
mock_popen.return_value = process_mock
391391

392-
# Ensure the error is raised when both GRES and GPU are set
393-
with pytest.raises(
394-
WorkflowError, match="GRES and GPU are set. Please only set one"
395-
):
396-
set_gres_string(job)
392+
assert set_gres_string(job) == " --gres=gpu:1 --gpus=2"
397393

398394
def test_nested_string_raise(self, mock_job):
399395
"""Test error case when gres is a nested string."""

0 commit comments

Comments
 (0)