Home / Function/ test_parse_json_string_success_cases() — langchain Function Reference

test_parse_json_string_success_cases() — langchain Function Reference

Architecture documentation for the test_parse_json_string_success_cases() function in test_chat_models.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  3dd379a0_08bd_4bf2_f41b_da52af7d8934["test_parse_json_string_success_cases()"]
  9c4a2438_9884_cbb0_3cf5_de8827531653["test_chat_models.py"]
  3dd379a0_08bd_4bf2_f41b_da52af7d8934 -->|defined in| 9c4a2438_9884_cbb0_3cf5_de8827531653
  style 3dd379a0_08bd_4bf2_f41b_da52af7d8934 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/ollama/tests/unit_tests/test_chat_models.py lines 155–161

def test_parse_json_string_success_cases(
    input_string: str, expected_output: Any
) -> None:
    """Tests that `_parse_json_string` correctly parses valid and fixable strings."""
    raw_tool_call = {"function": {"name": "test_func", "arguments": input_string}}
    result = _parse_json_string(input_string, raw_tool_call=raw_tool_call, skip=False)
    assert result == expected_output

Domain

Subdomains

Frequently Asked Questions

What does test_parse_json_string_success_cases() do?
test_parse_json_string_success_cases() is a function in the langchain codebase, defined in libs/partners/ollama/tests/unit_tests/test_chat_models.py.
Where is test_parse_json_string_success_cases() defined?
test_parse_json_string_success_cases() is defined in libs/partners/ollama/tests/unit_tests/test_chat_models.py at line 155.

Analyze Your Own Codebase

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

Try Supermodel Free