Skip to content

Commit 2679e30

Browse files
committed
Make CI happy
1 parent 0f0dda9 commit 2679e30

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

smartsim/_core/launcher_/slurm/slurm_launcher.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
import time
3434
import typing as t
3535

36+
from typing_extensions import TypeAlias
37+
3638
from smartsim._core.config import CONFIG
3739
from smartsim._core.launcher_.slurm import slurm_commands as commands
3840
from smartsim._core.launcher_.slurm import slurm_parser as parser
@@ -118,7 +120,7 @@ def start(self) -> None:
118120
)
119121

120122

121-
_SlurmCommandType: t.TypeAlias = SrunCommand
123+
_SlurmCommandType: TypeAlias = SrunCommand
122124
"""Types that are capable of being launched by the `SlurmLauncher`"""
123125

124126

tests/test_slurm_launcher.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ def test_slurm_launcher_can_start_a_command(monkeypatch, make_srun_command):
126126
)
127127
launcher = SlurmLauncher()
128128
srun = make_srun_command(["-N", "1", "-n", "1"], ["echo", "spam", "eggs"])
129+
monkeypatch.setattr(srun, "start", lambda *_, **__: ...)
129130
id_ = launcher.start(srun)
130131
info = launcher._launched[id_]
131132
assert info.slurm_id == "mock-step-id"
@@ -145,6 +146,7 @@ def test_slurm_launcher_errors_if_cannot_parse_id(monkeypatch, make_srun_command
145146
monkeypatch.setattr(time, "sleep", lambda *_, **__: ...)
146147
launcher = SlurmLauncher()
147148
srun = make_srun_command(["-N", "1", "-n", "1"], ["echo", "spam", "eggs"])
149+
monkeypatch.setattr(srun, "start", lambda *_, **__: ...)
148150
with pytest.raises(
149151
errors.LauncherError, match=r"Could not find id of launched job step"
150152
):

0 commit comments

Comments
 (0)