test_dumps_mixed_data_structure() — langchain Function Reference
Architecture documentation for the test_dumps_mixed_data_structure() function in test_serializable.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD b1b3f08e_6f7e_855c_4d12_6c0b14fed675["test_dumps_mixed_data_structure()"] d90477e3_b806_4058_daf0_8495f08436d6["test_serializable.py"] b1b3f08e_6f7e_855c_4d12_6c0b14fed675 -->|defined in| d90477e3_b806_4058_daf0_8495f08436d6 style b1b3f08e_6f7e_855c_4d12_6c0b14fed675 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/load/test_serializable.py lines 367–382
def test_dumps_mixed_data_structure() -> None:
"""Test `dumps()` with complex nested data structures."""
data = {
"serializable": Foo(bar=1, baz="test"),
"list": [1, 2, {"nested": "value"}],
"primitive": "string",
}
json_str = dumps(data)
parsed = json.loads(json_str)
# Serializable object should be properly serialized
assert parsed["serializable"]["type"] == "constructor"
# Primitives should remain unchanged
assert parsed["list"] == [1, 2, {"nested": "value"}]
assert parsed["primitive"] == "string"
Domain
Subdomains
Source
Frequently Asked Questions
What does test_dumps_mixed_data_structure() do?
test_dumps_mixed_data_structure() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/load/test_serializable.py.
Where is test_dumps_mixed_data_structure() defined?
test_dumps_mixed_data_structure() is defined in libs/core/tests/unit_tests/load/test_serializable.py at line 367.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free