Home / Function/ test_dumps_pretty_formatting() — langchain Function Reference

test_dumps_pretty_formatting() — langchain Function Reference

Architecture documentation for the test_dumps_pretty_formatting() function in test_serializable.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  5e3d9e44_c693_779c_45f6_977f630bf20e["test_dumps_pretty_formatting()"]
  d90477e3_b806_4058_daf0_8495f08436d6["test_serializable.py"]
  5e3d9e44_c693_779c_45f6_977f630bf20e -->|defined in| d90477e3_b806_4058_daf0_8495f08436d6
  style 5e3d9e44_c693_779c_45f6_977f630bf20e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/load/test_serializable.py lines 312–326

def test_dumps_pretty_formatting() -> None:
    """Test pretty printing functionality."""
    foo = Foo(bar=1, baz="hello")

    # Test pretty=True with default indent
    pretty_json = dumps(foo, pretty=True)
    assert "  " in pretty_json

    # Test custom indent (4-space)
    custom_indent = dumps(foo, pretty=True, indent=4)
    assert "    " in custom_indent

    # Verify it's still valid JSON
    parsed = json.loads(pretty_json)
    assert parsed["kwargs"]["bar"] == 1

Domain

Subdomains

Frequently Asked Questions

What does test_dumps_pretty_formatting() do?
test_dumps_pretty_formatting() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/load/test_serializable.py.
Where is test_dumps_pretty_formatting() defined?
test_dumps_pretty_formatting() is defined in libs/core/tests/unit_tests/load/test_serializable.py at line 312.

Analyze Your Own Codebase

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

Try Supermodel Free