Skip to content

Commit

Permalink
fix coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
elad-c committed Jan 21, 2025
1 parent 6e70525 commit b275399
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ def compute_graph_max_cut(memory_graph: MemoryGraph,
try:
schedule, max_cut_size, cuts = max_cut_astar.solve(estimate=estimate, iter_limit=astar_n_iter,
time_limit=None if it == 0 else 300)
except TimeoutError:
except TimeoutError: # pragma: no cover
# TODO: add test for this.
if last_result[0] is None:
Logger.critical(f"Max-cut solver stopped on timeout in iteration {it} before finding a solution.") # pragma: no cover
Logger.critical(f"Max-cut solver stopped on timeout in iteration {it} before finding a solution.")
else:
Logger.warning(f"Max-cut solver stopped on timeout in iteration {it}.")
return last_result
Expand Down

0 comments on commit b275399

Please sign in to comment.