Skip to content

Commit

Permalink
✅ Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dalonsoa committed Sep 10, 2024
1 parent e3c5776 commit 80416c2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/test_extensions.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,15 @@ def arc_dummy_patch():
apply_patches(model)

# Verify that the patches are applied correctly
assert model.nodes[node.name].apply_overrides == dummy_patch
assert (
model.nodes[node.name].apply_overrides.__qualname__ == dummy_patch.__qualname__
)
assert model.nodes[node.name].t == another_dummy_patch(node)
assert model.nodes[node.name].pull_set_handler["default"] == yet_another_dummy_patch
assert model.nodes[node.name].dummy_arc.arc_mass_balance == arc_dummy_patch
assert (
model.nodes[node.name].dummy_arc.arc_mass_balance.__qualname__
== arc_dummy_patch.__qualname__
)


def assert_dict_almost_equal(d1: dict, d2: dict, tol: float | None = None):
Expand Down

0 comments on commit 80416c2

Please sign in to comment.