Skip to content

Commit

Permalink
fix: Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Ernst Würger <[email protected]>
  • Loading branch information
huyenngn and ewuerger committed Nov 20, 2024
1 parent 673fc9b commit f31a258
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion capellambse_context_diagrams/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,6 @@ def _create_edge(
src_id, trg_id = port_id, interface_id
routing_points = [port_middle, interface_middle]
else:
# styleclass == "FOP"
eid = f"__PortOutputAllocation:{port_id}"
src_id, trg_id = interface_id, port_id
routing_points = [interface_middle, port_middle]
Expand Down
6 changes: 3 additions & 3 deletions tests/test_cable_tree_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
("39e96ffc-2f32-41b9-b406-ba82c78fe451", 8), id="Inside Tree"
),
pytest.param(
("6c607b75-504a-4d68-966b-0982fde3275e", 20), id="Outside Tree"
("6c607b75-504a-4d68-966b-0982fde3275e", 14), id="Outside Tree"
),
],
)
def test_cable_tree_views(
model: capellambse.MelodyModel, diagram_elements: tuple[str, int]
) -> None:
uuid, elements_n = diagram_elements
uuid, number_of_elements = diagram_elements
obj = model.by_uuid(uuid)

diag = obj.cable_tree

assert len(diag.nodes) == elements_n
assert len(diag.nodes) >= number_of_elements

0 comments on commit f31a258

Please sign in to comment.