Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 26, 2024
1 parent c97b963 commit 451def3
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/save/test_adjust.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,23 @@ def test_add_adjust_to_national_forecast(latest_me, db_session):
)[0]

# don't adjust
add_adjust_to_national_forecast(session=db_session, forecast=forecast, max_adjust_percentage=None)
add_adjust_to_national_forecast(
session=db_session, forecast=forecast, max_adjust_percentage=None
)
assert forecast.forecast_values[0].adjust_mw == 16 * 60 + 30

# check if zero, then adjust value is zero
forecast.forecast_values[0].expected_power_generation_megawatts = 0.0
add_adjust_to_national_forecast(session=db_session, forecast=forecast, max_adjust_percentage=0.2)
add_adjust_to_national_forecast(
session=db_session, forecast=forecast, max_adjust_percentage=0.2
)
assert forecast.forecast_values[0].adjust_mw == 0.0

# check value is at 20%
forecast.forecast_values[0].expected_power_generation_megawatts = 1.0
add_adjust_to_national_forecast(session=db_session, forecast=forecast, max_adjust_percentage=0.2)
add_adjust_to_national_forecast(
session=db_session, forecast=forecast, max_adjust_percentage=0.2
)
assert forecast.forecast_values[0].adjust_mw == 0.2


Expand Down

0 comments on commit 451def3

Please sign in to comment.