From f31a258b7917cabae2a4d96f1c9b9c0fe72f355d Mon Sep 17 00:00:00 2001 From: Huyen Nguyen <48179958+huyenngn@users.noreply.github.com> Date: Wed, 20 Nov 2024 13:55:09 +0100 Subject: [PATCH] fix: Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ernst Würger --- capellambse_context_diagrams/context.py | 1 - tests/test_cable_tree_views.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/capellambse_context_diagrams/context.py b/capellambse_context_diagrams/context.py index 834416f..6c19378 100644 --- a/capellambse_context_diagrams/context.py +++ b/capellambse_context_diagrams/context.py @@ -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] diff --git a/tests/test_cable_tree_views.py b/tests/test_cable_tree_views.py index ccfc145..2376e7f 100644 --- a/tests/test_cable_tree_views.py +++ b/tests/test_cable_tree_views.py @@ -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