Skip to content

Commit

Permalink
Fix reported issue by hypothesis
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-el committed Oct 2, 2024
1 parent cc67aa9 commit 38803a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/ert/scheduler/lsf_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,7 @@ def parse_bjobs_exec_hosts(bjobs_output: str) -> Dict[str, str]:
tokens = line.split(sep="^")
if len(tokens) == 3:
job_id, _, exec_hosts = tokens
if exec_hosts != "-":
data[job_id] = exec_hosts
data[job_id] = exec_hosts
return data


Expand Down
5 changes: 2 additions & 3 deletions tests/ert/unit_tests/scheduler/test_lsf_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,11 +453,10 @@ def test_parse_bjobs_happy_path(bjobs_output, expected):
{"1": "abc-comp01"},
id="one_host",
),
pytest.param("1^DONE^-", {}, id="no_host"),
pytest.param(
"1^DONE^abc-comp02\n2^RUN^-",
{"1": "abc-comp02"},
id="only_one_host_outputs",
{"1": "abc-comp02", "2": "-"},
id="two_hosts_output",
),
],
)
Expand Down

0 comments on commit 38803a9

Please sign in to comment.