test_simple_deserialization_with_additional_imports() — langchain Function Reference
Architecture documentation for the test_simple_deserialization_with_additional_imports() function in test_serializable.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 02ba24a7_3485_9d55_e0b1_5218ca2d0967["test_simple_deserialization_with_additional_imports()"] d90477e3_b806_4058_daf0_8495f08436d6["test_serializable.py"] 02ba24a7_3485_9d55_e0b1_5218ca2d0967 -->|defined in| d90477e3_b806_4058_daf0_8495f08436d6 style 02ba24a7_3485_9d55_e0b1_5218ca2d0967 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/load/test_serializable.py lines 175–199
def test_simple_deserialization_with_additional_imports() -> None:
foo = Foo(bar=1, baz="hello")
assert foo.lc_id() == ["tests", "unit_tests", "load", "test_serializable", "Foo"]
serialized_foo = dumpd(foo)
assert serialized_foo == {
"id": ["tests", "unit_tests", "load", "test_serializable", "Foo"],
"kwargs": {"bar": 1, "baz": "hello"},
"lc": 1,
"type": "constructor",
}
new_foo = load(
serialized_foo,
allowed_objects=[Foo2],
valid_namespaces=["tests"],
additional_import_mappings={
("tests", "unit_tests", "load", "test_serializable", "Foo"): (
"tests",
"unit_tests",
"load",
"test_serializable",
"Foo2",
)
},
)
assert isinstance(new_foo, Foo2)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_simple_deserialization_with_additional_imports() do?
test_simple_deserialization_with_additional_imports() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/load/test_serializable.py.
Where is test_simple_deserialization_with_additional_imports() defined?
test_simple_deserialization_with_additional_imports() is defined in libs/core/tests/unit_tests/load/test_serializable.py at line 175.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free