File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -536,6 +536,14 @@ def simple_model() -> pm.Model:
536536 return model
537537
538538
539+ @pytest .fixture (scope = "module" )
540+ def variable_with_space ():
541+ with pm .Model () as model :
542+ pm .Normal ("plant growth" )
543+
544+ return model
545+
546+
539547def test_unknown_node_type (simple_model ):
540548 with pytest .raises (ValueError , match = "Node formatters must be of type NodeType." ):
541549 model_to_graphviz (simple_model , node_formatters = {"Unknown Node Type" : "dummy" })
@@ -652,3 +660,17 @@ def test_model_to_mermaid(simple_model):
652660 %% Plates:
653661 """ )
654662 assert model_to_mermaid (simple_model ) == expected_mermaid_string .strip ()
663+
664+
665+ def test_model_to_mermaid_with_variable_with_space (variable_with_space ):
666+ expected_mermaid_string = dedent ("""
667+ graph TD
668+ %% Nodes:
669+ plant_growth([plant growth ~ Normal])
670+ plant_growth@{ shape: rounded }
671+
672+ %% Edges:
673+
674+ %% Plates:
675+ """ )
676+ assert model_to_mermaid (variable_with_space ) == expected_mermaid_string .strip ()
You can’t perform that action at this time.
0 commit comments