Skip to content

test(core): fix expected generations shape in test_stream_error_callback#36947

Closed
zxuhan7 (zxuhan) wants to merge 1 commit intolangchain-ai:masterfrom
zxuhan:fix/36866-stream-error-callback
Closed

test(core): fix expected generations shape in test_stream_error_callback#36947
zxuhan7 (zxuhan) wants to merge 1 commit intolangchain-ai:masterfrom
zxuhan:fix/36866-stream-error-callback

Conversation

@zxuhan
Copy link
Copy Markdown

Closes #36866


test_stream_error_callback was marked xfail because the i == 0 branch asserted llm_result.generations == [], but the callback receives an LLMResult whose generations preserves the batch dimension — the actual value is [[]]. Since #30228 the assertion executes correctly, so the xfail was hiding a stale test expectation rather than a product bug.

Fix updates the assertion to [[]] and removes the xfail marker so the test now exercises and protects the callback path.

AI agent involvement: this contribution was drafted with assistance from an AI coding agent.

@github-actions github-actions Bot added core `langchain-core` package issues & PRs size: XS < 50 LOC tests PRs made that add, modify, or remove tests labels Apr 22, 2026
@github-actions
Copy link
Copy Markdown

This PR has been automatically closed because you are not assigned to the linked issue.

External contributors must be assigned to an issue before opening a PR for it. Please:

  1. Comment on the linked issue to request assignment from a maintainer
  2. Once assigned, your PR will be reopened automatically

Maintainers: reopen this PR or remove the missing-issue-link label to bypass this check.

@github-actions github-actions Bot closed this Apr 22, 2026
@zxuhan zxuhan7 (zxuhan) deleted the fix/36866-stream-error-callback branch April 22, 2026 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core `langchain-core` package issues & PRs external missing-issue-link new-contributor size: XS < 50 LOC tests PRs made that add, modify, or remove tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_stream_error_callback expects [] instead of [[]] for empty stream error result

1 participant