Skip to content

test: cover two untested branches in create_pydantic_model_from_schema - #1203

Open
magic-peach wants to merge 1 commit into
dapr:mainfrom
magic-peach:test/mcp-schema-coverage-gaps
Open

test: cover two untested branches in create_pydantic_model_from_schema#1203
magic-peach wants to merge 1 commit into
dapr:mainfrom
magic-peach:test/mcp-schema-coverage-gaps

Conversation

@magic-peach

Copy link
Copy Markdown

Description

create_pydantic_model_from_schema in dapr/ext/workflow/mcp_schema.py had two branches with no test coverage despite the rest of the file being fairly thorough: the invalid schema to ValueError wrapping path, and an array type nested inside an anyOf/oneOf variant. Both already worked correctly, ran them before writing the assertions to confirm, this just closes the coverage gap.

Issue reference

Please reference the issue this PR will close: # N/A, found while reading mcp_schema.py for test coverage gaps, no existing issue.

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

…hema

The invalid schema to ValueError wrapping path and the array type
inside an anyOf variant branch had no test, despite the rest of the
file being fairly thorough. Both already worked correctly, ran them
before writing the assertions to confirm.

Signed-off-by: Akanksha Trehun <akankshatrehun@gmail.com>
@magic-peach
magic-peach requested review from a team as code owners September 10, 2026 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant