mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-09-13 07:21:16 +00:00
Mypy (#217)
* Mypy: Initial support * Add to pre-commit (currently installs own deps, could maybe changed to poetry venv in the future to reuse environment and don't need duplicated types deps). * Add type hints. * Mypy: Add missing annotations
This commit is contained in:
committed by
GitHub
parent
2a163569bc
commit
1163ddb4ac
@@ -54,7 +54,7 @@ def test_optimize(
|
||||
|
||||
file = DIR_TESTDATA / fn_out
|
||||
with file.open("r") as f_out:
|
||||
expected_output_data = json.load(f_out)
|
||||
expected_result = OptimizeResponse(**json.load(f_out))
|
||||
|
||||
opt_class = optimization_problem(tmp_config, fixed_seed=42)
|
||||
start_hour = 10
|
||||
@@ -72,9 +72,7 @@ def test_optimize(
|
||||
# Assert that the output contains all expected entries.
|
||||
# This does not assert that the optimization always gives the same result!
|
||||
# Reproducibility and mathematical accuracy should be tested on the level of individual components.
|
||||
compare_dict(ergebnis, expected_output_data)
|
||||
compare_dict(ergebnis.model_dump(), expected_result.model_dump())
|
||||
|
||||
# The function creates a visualization result PDF as a side-effect.
|
||||
visualisiere_ergebnisse_patch.assert_called_once()
|
||||
|
||||
OptimizeResponse(**ergebnis)
|
||||
|
Reference in New Issue
Block a user