Skip to content

Commit

Permalink
Make CI happy
Browse files Browse the repository at this point in the history
  • Loading branch information
MattToast committed Oct 10, 2024
1 parent 0f0dda9 commit 2679e30
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion smartsim/_core/launcher_/slurm/slurm_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
import time
import typing as t

from typing_extensions import TypeAlias

from smartsim._core.config import CONFIG
from smartsim._core.launcher_.slurm import slurm_commands as commands
from smartsim._core.launcher_.slurm import slurm_parser as parser
Expand Down Expand Up @@ -118,7 +120,7 @@ def start(self) -> None:
)


_SlurmCommandType: t.TypeAlias = SrunCommand
_SlurmCommandType: TypeAlias = SrunCommand
"""Types that are capable of being launched by the `SlurmLauncher`"""


Expand Down
2 changes: 2 additions & 0 deletions tests/test_slurm_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ def test_slurm_launcher_can_start_a_command(monkeypatch, make_srun_command):
)
launcher = SlurmLauncher()
srun = make_srun_command(["-N", "1", "-n", "1"], ["echo", "spam", "eggs"])
monkeypatch.setattr(srun, "start", lambda *_, **__: ...)
id_ = launcher.start(srun)
info = launcher._launched[id_]
assert info.slurm_id == "mock-step-id"
Expand All @@ -145,6 +146,7 @@ def test_slurm_launcher_errors_if_cannot_parse_id(monkeypatch, make_srun_command
monkeypatch.setattr(time, "sleep", lambda *_, **__: ...)
launcher = SlurmLauncher()
srun = make_srun_command(["-N", "1", "-n", "1"], ["echo", "spam", "eggs"])
monkeypatch.setattr(srun, "start", lambda *_, **__: ...)
with pytest.raises(
errors.LauncherError, match=r"Could not find id of launched job step"
):
Expand Down

0 comments on commit 2679e30

Please sign in to comment.