Skip to content

Commit d4deccf

Browse files
[pre-commit.ci lite] apply automatic fixes
1 parent 15c73f9 commit d4deccf

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

‎apps/predbat/unit_test.py‎

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6188,7 +6188,7 @@ def run_model_tests(my_predbat):
61886188
0.1,
61896189
0,
61906190
assert_final_metric=import_rate,
6191-
assert_final_soc=5-23*0.1,
6191+
assert_final_soc=5 - 23 * 0.1,
61926192
with_battery=True,
61936193
battery_size=10,
61946194
charge_window_best=[{"start": my_predbat.minutes_now + 60, "end": my_predbat.minutes_now + 120, "average": import_rate}],
@@ -6199,14 +6199,14 @@ def run_model_tests(my_predbat):
61996199
)
62006200
if failed:
62016201
return failed
6202-
6202+
62036203
failed |= simple_scenario(
62046204
"hold_during discharge2",
62056205
my_predbat,
62066206
0.1,
62076207
0,
62086208
assert_final_metric=import_rate,
6209-
assert_final_soc=5-23*0.1/0.8,
6209+
assert_final_soc=5 - 23 * 0.1 / 0.8,
62106210
with_battery=True,
62116211
battery_size=10,
62126212
charge_window_best=[{"start": my_predbat.minutes_now + 60, "end": my_predbat.minutes_now + 120, "average": import_rate}],
@@ -6218,7 +6218,7 @@ def run_model_tests(my_predbat):
62186218
)
62196219
if failed:
62206220
return failed
6221-
6221+
62226222
failed |= simple_scenario(
62236223
"hold_during discharge_pv1",
62246224
my_predbat,
@@ -6243,7 +6243,7 @@ def run_model_tests(my_predbat):
62436243
0.1,
62446244
0.2,
62456245
assert_final_metric=0,
6246-
assert_final_soc=5 + 0.1 *24,
6246+
assert_final_soc=5 + 0.1 * 24,
62476247
with_battery=True,
62486248
battery_size=10,
62496249
charge_window_best=[{"start": my_predbat.minutes_now + 60, "end": my_predbat.minutes_now + 120, "average": import_rate}],
@@ -6261,7 +6261,7 @@ def run_model_tests(my_predbat):
62616261
0.1,
62626262
0.2,
62636263
assert_final_metric=0,
6264-
assert_final_soc=5 + 0.1*24, # For AC Coupled PV arrives as AC
6264+
assert_final_soc=5 + 0.1 * 24, # For AC Coupled PV arrives as AC
62656265
with_battery=True,
62666266
battery_size=10,
62676267
charge_window_best=[{"start": my_predbat.minutes_now + 60, "end": my_predbat.minutes_now + 120, "average": import_rate}],
@@ -6281,7 +6281,7 @@ def run_model_tests(my_predbat):
62816281
0.1,
62826282
0.2,
62836283
assert_final_metric=0,
6284-
assert_final_soc=5 + ((0.2 * 0.8) - 0.1) *24, # For DC Coupled PV arrives as DC
6284+
assert_final_soc=5 + ((0.2 * 0.8) - 0.1) * 24, # For DC Coupled PV arrives as DC
62856285
with_battery=True,
62866286
battery_size=10,
62876287
charge_window_best=[{"start": my_predbat.minutes_now + 60, "end": my_predbat.minutes_now + 120, "average": import_rate}],
@@ -6295,7 +6295,6 @@ def run_model_tests(my_predbat):
62956295
if failed:
62966296
return failed
62976297

6298-
62996298
failed |= simple_scenario(
63006299
"load_bat_dc_pv",
63016300
my_predbat,
@@ -9719,7 +9718,7 @@ def main():
97199718
failed |= run_perf_test(my_predbat)
97209719
if args.perf_only:
97219720
return failed
9722-
9721+
97239722
if not failed:
97249723
failed |= run_model_tests(my_predbat)
97259724

0 commit comments

Comments
 (0)