Skip to content

Commit 7c656fb

Browse files
Copilotlebrice
andcommitted
Fix syntax error in test_submit_first finally block
Agent-Logs-Url: https://github.com/mila-iqia/cluv/sessions/1f65cc86-e12e-40dd-9e49-f04521f21bfa Co-authored-by: lebrice <13387299+lebrice@users.noreply.github.com>
1 parent cb64098 commit 7c656fb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

tests/test_integration.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,9 @@ async def test_submit_first():
285285
finally:
286286
if job_info is not None:
287287
# Cancel the winning job only on the cluster where it was submitted.
288-
remote = next(remote for remote in remotes if remote.hostname == job_info.cluster
289-
await r.run(f"scancel {job_info.job_id}", warn=True, hide=True, display=True)
288+
remote = next((r for r in remotes if r.hostname == job_info.cluster), None)
289+
if remote is not None:
290+
await remote.run(f"scancel {job_info.job_id}", warn=True, hide=True, display=True)
290291

291292

292293
@pytest.fixture

0 commit comments

Comments
 (0)