Skip to content

Commit

Permalink
[pre-commit.ci lite] apply automatic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci-lite[bot] authored Dec 26, 2024
1 parent 77445e4 commit 2f7b7e0
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions apps/predbat/unit_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1694,7 +1694,7 @@ def run_single_debug(test_name, my_predbat, debug_file, expected_file=None):
if not expected_file:
my_predbat.combine_export_slots = False
# my_predbat.best_soc_keep = 1.0
#my_predbat.metric_min_improvement_export = 5
# my_predbat.metric_min_improvement_export = 5

if re_do_rates:
# Set rate thresholds
Expand Down Expand Up @@ -1783,12 +1783,7 @@ def run_single_debug(test_name, my_predbat, debug_file, expected_file=None):
print("Wrote plan to {}".format(filename))

# Expected
actual_data = {
"charge_limit_best": my_predbat.charge_limit_best,
"charge_window_best": my_predbat.charge_window_best,
"export_window_best": my_predbat.export_window_best,
"export_limits_best": my_predbat.export_limits_best
}
actual_data = {"charge_limit_best": my_predbat.charge_limit_best, "charge_window_best": my_predbat.charge_window_best, "export_window_best": my_predbat.export_window_best, "export_limits_best": my_predbat.export_limits_best}
actual_json = json.dumps(actual_data)
if expected_file:
print("Compare with {}".format(expected_file))
Expand All @@ -1807,6 +1802,7 @@ def run_single_debug(test_name, my_predbat, debug_file, expected_file=None):
print("Wrote plan json to {}".format(filename))
return failed


def run_execute_tests(my_predbat):
print("**** Running execute tests ****\n")
reset_inverter(my_predbat)
Expand Down

0 comments on commit 2f7b7e0

Please sign in to comment.