mirror of
https://github.com/hwchase17/langchain.git
synced 2026-07-16 00:19:35 +00:00
Apply patch [skip ci]
This commit is contained in:
@@ -235,7 +235,9 @@ def test_inherit_run_name_with_chain() -> None:
|
||||
captured_names: list[str] = []
|
||||
|
||||
class TestCallbackHandler(BaseCallbackHandler):
|
||||
def on_chain_start(self, _serialized: dict, _inputs: Any, **kwargs: Any) -> None:
|
||||
def on_chain_start(
|
||||
self, _serialized: dict, _inputs: Any, **kwargs: Any
|
||||
) -> None:
|
||||
name = kwargs.get("name", "unnamed")
|
||||
captured_names.append(name)
|
||||
|
||||
@@ -286,7 +288,7 @@ def test_inherit_run_name_with_chain() -> None:
|
||||
|
||||
def test_inherit_run_name_with_override() -> None:
|
||||
"""Test that per-step with_config can still set different run_names.
|
||||
|
||||
|
||||
Verifies that when inherit_run_name is NOT used, the traditional behavior
|
||||
of setting different run_names per step via with_config still works.
|
||||
"""
|
||||
@@ -297,7 +299,9 @@ def test_inherit_run_name_with_override() -> None:
|
||||
captured_names: list[str] = []
|
||||
|
||||
class TestCallbackHandler(BaseCallbackHandler):
|
||||
def on_chain_start(self, _serialized: dict, _inputs: Any, **kwargs: Any) -> None:
|
||||
def on_chain_start(
|
||||
self, _serialized: dict, _inputs: Any, **kwargs: Any
|
||||
) -> None:
|
||||
name = kwargs.get("name", "unnamed")
|
||||
captured_names.append(name)
|
||||
|
||||
@@ -366,8 +370,3 @@ def test_inherit_run_name_merge_configs() -> None:
|
||||
"inherit_run_name should pass through ensure_config"
|
||||
)
|
||||
assert ensured.get("run_name") == "test_run", "run_name should be preserved"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user