From 717060c075d45636b578dd5ad24f0cdd26f25595 Mon Sep 17 00:00:00 2001 From: Kristoffer Andersson Date: Wed, 8 May 2024 12:51:07 +0200 Subject: [PATCH] test: add test for graph.set_source --- tests/test_graph.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_graph.py b/tests/test_graph.py index 23244d4..5103be0 100644 --- a/tests/test_graph.py +++ b/tests/test_graph.py @@ -76,6 +76,17 @@ def test_graph_case2() -> None: assert "e-s0-s1-t20" in gm.edges +def test_set_source() -> None: + source = "Jonat han saknades" + target = "Jonathan saknaes" + + g = graph.init(target) + + gm = graph.set_source(g, source) + print(f"{gm=}") + assert "e-s2-s3-t0" in gm.edges + + def test_unaligned_set_side() -> None: g0 = graph.init("a bc d") print(">>> test_unaligned_set_side")