Skip to content

Commit

Permalink
Polish
Browse files Browse the repository at this point in the history
  • Loading branch information
crusaderky committed Apr 5, 2022
1 parent 4be1c9d commit b3cbedb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion distributed/tests/test_worker_state_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,5 +131,5 @@ def test_merge_recs_instructions():
{x: "memory"},
[],
)
with pytest.raises(AssertionError):
with pytest.raises(ValueError):
merge_recs_instructions(({x: "memory"}, []), ({x: "released"}, []))
4 changes: 2 additions & 2 deletions distributed/worker_state_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,8 @@ def merge_recs_instructions(*args: RecsInstrs) -> RecsInstrs:
for recs_i, instr_i in args:
for k, v in recs_i.items():
if k in recs and recs[k] != v:
raise AssertionError( # pragma: nocover
f"Mismatched reccommendations for {k}: {recs[k]} vs. {v}"
raise ValueError(
f"Mismatched recommendations for {k}: {recs[k]} vs. {v}"
)
recs[k] = v
instr += instr_i
Expand Down

0 comments on commit b3cbedb

Please sign in to comment.