Home / Function/ test_simple_serialization_is_serializable() — langchain Function Reference

test_simple_serialization_is_serializable() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  2b38e571_aba5_8fb6_219a_1b86eb47b76c["test_simple_serialization_is_serializable()"]
  d90477e3_b806_4058_daf0_8495f08436d6["test_serializable.py"]
  2b38e571_aba5_8fb6_219a_1b86eb47b76c -->|defined in| d90477e3_b806_4058_daf0_8495f08436d6
  32e847bb_79c8_2c81_4d16_4051f39f43ae["is_lc_serializable()"]
  2b38e571_aba5_8fb6_219a_1b86eb47b76c -->|calls| 32e847bb_79c8_2c81_4d16_4051f39f43ae
  style 2b38e571_aba5_8fb6_219a_1b86eb47b76c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/load/test_serializable.py lines 51–67

def test_simple_serialization_is_serializable() -> None:
    class Foo(Serializable):
        bar: int
        baz: str

        @classmethod
        def is_lc_serializable(cls) -> bool:
            return True

    foo = Foo(bar=1, baz="hello")
    assert foo.lc_id() == ["tests", "unit_tests", "load", "test_serializable", "Foo"]
    assert dumpd(foo) == {
        "id": ["tests", "unit_tests", "load", "test_serializable", "Foo"],
        "kwargs": {"bar": 1, "baz": "hello"},
        "lc": 1,
        "type": "constructor",
    }

Domain

Subdomains

Frequently Asked Questions

What does test_simple_serialization_is_serializable() do?
test_simple_serialization_is_serializable() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/load/test_serializable.py.
Where is test_simple_serialization_is_serializable() defined?
test_simple_serialization_is_serializable() is defined in libs/core/tests/unit_tests/load/test_serializable.py at line 51.
What does test_simple_serialization_is_serializable() call?
test_simple_serialization_is_serializable() calls 1 function(s): is_lc_serializable.

Analyze Your Own Codebase

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

Try Supermodel Free