test_serialization_with_ignore_unserializable_fields() — langchain Function Reference
Architecture documentation for the test_serialization_with_ignore_unserializable_fields() function in test_serializable.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 9d043082_be9f_5bcd_6155_34d798445427["test_serialization_with_ignore_unserializable_fields()"] d90477e3_b806_4058_daf0_8495f08436d6["test_serializable.py"] 9d043082_be9f_5bcd_6155_34d798445427 -->|defined in| d90477e3_b806_4058_daf0_8495f08436d6 style 9d043082_be9f_5bcd_6155_34d798445427 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/load/test_serializable.py lines 252–293
def test_serialization_with_ignore_unserializable_fields() -> None:
data = {
"messages": [
[
{
"lc": 1,
"type": "constructor",
"id": ["langchain", "schema", "messages", "AIMessage"],
"kwargs": {
"content": "Call tools to get entity details",
"response_metadata": {
"other_field": "foo",
"create_date": {
"lc": 1,
"type": "not_implemented",
"id": ["datetime", "datetime"],
"repr": "datetime.datetime(2025, 7, 15, 13, 14, 0, 000000, tzinfo=datetime.timezone.utc)", # noqa: E501
},
},
"type": "ai",
"id": "00000000-0000-0000-0000-000000000000",
},
},
]
]
}
# Load directly (no dumpd - this is already serialized data)
deser = load(data, allowed_objects=[AIMessage], ignore_unserializable_fields=True)
assert deser == {
"messages": [
[
AIMessage(
id="00000000-0000-0000-0000-000000000000",
content="Call tools to get entity details",
response_metadata={
"other_field": "foo",
"create_date": None,
},
)
]
]
}
Domain
Subdomains
Source
Frequently Asked Questions
What does test_serialization_with_ignore_unserializable_fields() do?
test_serialization_with_ignore_unserializable_fields() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/load/test_serializable.py.
Where is test_serialization_with_ignore_unserializable_fields() defined?
test_serialization_with_ignore_unserializable_fields() is defined in libs/core/tests/unit_tests/load/test_serializable.py at line 252.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free