Home / Function/ test_graph_mermaid_to_safe_id() — langchain Function Reference

test_graph_mermaid_to_safe_id() — langchain Function Reference

Architecture documentation for the test_graph_mermaid_to_safe_id() function in test_graph.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  fed3362c_3bef_f1c3_d8e1_2a5e56b66e7e["test_graph_mermaid_to_safe_id()"]
  83e2cebc_592b_5a1b_c581_48dfbd3d53cf["test_graph.py"]
  fed3362c_3bef_f1c3_d8e1_2a5e56b66e7e -->|defined in| 83e2cebc_592b_5a1b_c581_48dfbd3d53cf
  style fed3362c_3bef_f1c3_d8e1_2a5e56b66e7e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/runnables/test_graph.py lines 525–530

def test_graph_mermaid_to_safe_id() -> None:
    """Test that node labels are correctly preprocessed for draw_mermaid."""
    assert _to_safe_id("foo") == "foo"
    assert _to_safe_id("foo-bar") == "foo-bar"
    assert _to_safe_id("foo_1") == "foo_1"
    assert _to_safe_id("#foo*&!") == "\\23foo\\2a\\26\\21"

Domain

Subdomains

Frequently Asked Questions

What does test_graph_mermaid_to_safe_id() do?
test_graph_mermaid_to_safe_id() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/runnables/test_graph.py.
Where is test_graph_mermaid_to_safe_id() defined?
test_graph_mermaid_to_safe_id() is defined in libs/core/tests/unit_tests/runnables/test_graph.py at line 525.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free