Home / Function/ test_simple_deserialization() — langchain Function Reference

test_simple_deserialization() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/core/tests/unit_tests/load/test_serializable.py lines 145–156

def test_simple_deserialization() -> 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=[Foo], valid_namespaces=["tests"])
    assert new_foo == foo

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free