Skip to content

Commit dd47b0c

Browse files
authored
Merge pull request #483 from simvue-io/hotfix/fix-created-mode
Fix incorrect information for running=False run initialisation
2 parents f46e717 + 29a07b1 commit dd47b0c

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

simvue/run.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -601,9 +601,7 @@ def init(
601601
"folder": folder,
602602
"name": name,
603603
"description": description,
604-
"system": get_system()
605-
if self._status == "running"
606-
else {"cpu": {}, "gpu": {}, "platform": {}},
604+
"system": get_system() if self._status == "running" else None,
607605
"visibility": {
608606
"users": [] if not isinstance(visibility, list) else visibility,
609607
"tenant": visibility == "tenant",

tests/refactor/test_run_class.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@
1919
from .conftest import CountingLogHandler
2020

2121

22+
@pytest.mark.run
23+
def test_created_run() -> None:
24+
with sv_run.Run() as run_created:
25+
run_created.init(running=False)
26+
27+
2228
@pytest.mark.run
2329
def test_check_run_initialised_decorator() -> None:
2430
with sv_run.Run(mode="offline") as run:

0 commit comments

Comments
 (0)