Home / Function/ test_sequential_valid_outputs() — langchain Function Reference

test_sequential_valid_outputs() — langchain Function Reference

Architecture documentation for the test_sequential_valid_outputs() function in test_sequential.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  7b403435_f69b_bca6_0e19_d1c8a6ed67f8["test_sequential_valid_outputs()"]
  0021bb47_51ab_bafd_26b4_c2849000554a["test_sequential.py"]
  7b403435_f69b_bca6_0e19_d1c8a6ed67f8 -->|defined in| 0021bb47_51ab_bafd_26b4_c2849000554a
  style 7b403435_f69b_bca6_0e19_d1c8a6ed67f8 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/tests/unit_tests/chains/test_sequential.py lines 173–184

def test_sequential_valid_outputs() -> None:
    """Test chain runs when valid outputs are specified."""
    chain_1 = FakeChain(input_variables=["foo"], output_variables=["bar"])
    chain_2 = FakeChain(input_variables=["bar"], output_variables=["baz"])
    chain = SequentialChain(
        chains=[chain_1, chain_2],
        input_variables=["foo"],
        output_variables=["bar", "baz"],
    )
    output = chain({"foo": "123"}, return_only_outputs=True)
    expected_output = {"baz": "123foofoo", "bar": "123foo"}
    assert output == expected_output

Domain

Subdomains

Frequently Asked Questions

What does test_sequential_valid_outputs() do?
test_sequential_valid_outputs() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/chains/test_sequential.py.
Where is test_sequential_valid_outputs() defined?
test_sequential_valid_outputs() is defined in libs/langchain/tests/unit_tests/chains/test_sequential.py at line 173.

Analyze Your Own Codebase

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

Try Supermodel Free