Skip to content

Commit 963b8b5

Browse files
test(sdk): made assertion exact and added xfail marker per review
1 parent 3ee299f commit 963b8b5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

libs/deepagents/tests/unit_tests/test_subagents.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,10 @@ def capture_recursion_limit(runtime: ToolRuntime) -> str:
645645
assert captured_config["tags"] == ["hello"]
646646
assert captured_config["metadata"]["lc_agent_name"] == "subagent-runtime-check"
647647

648+
@pytest.mark.xfail(
649+
reason="callbacks in parent config are not forwarded to subagent invocations (see #2315)",
650+
strict=True,
651+
)
648652
def test_subagent_propagates_callbacks_to_model_calls(self) -> None:
649653
"""Test that callbacks in parent config are forwarded to subagent model invocations.
650654
@@ -709,8 +713,8 @@ def on_llm_start(self, serialized: dict, prompts: list, **kwargs: Any) -> None:
709713
)
710714

711715
# All three LLM calls (2 parent + 1 subagent) should trigger the callback
712-
assert len(llm_start_agent_names) >= 2, (
713-
f"Expected callbacks from both parent and subagent LLM calls, but only got {len(llm_start_agent_names)}: {llm_start_agent_names}"
716+
assert len(llm_start_agent_names) == 3, (
717+
f"Expected callbacks from 2 parent + 1 subagent LLM calls, but only got {len(llm_start_agent_names)}: {llm_start_agent_names}"
714718
)
715719
# The subagent name should be identifiable in at least one callback
716720
assert any(name == "callback-check-subagent" for name in llm_start_agent_names), (

0 commit comments

Comments
 (0)