Skip to content

Commit bf24225

Browse files
committed
Tests: Cover bad path for mermaid function
1 parent e72bc4d commit bf24225

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/features/test_main.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,18 @@ class FakeGraph:
7777
assert "b-->c" in markup
7878

7979

80+
def test_graph_mermaid_raises_no_flavor():
81+
# Arrange
82+
class MockGraph:
83+
edges = [("x", "y"), ("y", "z")]
84+
85+
# Act / Assert
86+
with pytest.raises(
87+
RuntimeError, match="Error while generating graph: Flavor is None!"
88+
):
89+
fema.graph_as_mermaid_markup(None, MockGraph())
90+
91+
8092
def test_get_minimal_feature_set_filters():
8193
# Arrange
8294
class FakeGraph:

0 commit comments

Comments
 (0)