Skip to content

Commit

Permalink
* nemo/sim.py (_dispatch): Mark one unlikely block as 'no cover'.
Browse files Browse the repository at this point in the history
  • Loading branch information
bje- committed Nov 22, 2024
1 parent 0039f79 commit 4389aa1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nemo/sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def _dispatch(context, hour, residual_hour_demand, gens, generation, spill):
else:
gen, spl = generator.step(hour, residual_hour_demand)
if gen > residual_hour_demand and \
not isclose(gen, residual_hour_demand):
not isclose(gen, residual_hour_demand): # pragma: no cover
msg = (f"generation ({gen:.4f}) > demand "
f"({residual_hour_demand:.4f}) for {generator}")
raise AssertionError(msg)
Expand Down

0 comments on commit 4389aa1

Please sign in to comment.