Skip to content

tests: mark trailing slash test as xfail #1138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

felixweinberger
Copy link
Contributor

Motivation and Context

Address https://github.com/modelcontextprotocol/python-sdk/pull/945/files#r2192151570

How Has This Been Tested?

Ran full test suite.

Breaking Changes

None.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Pydantic's AnyUrl incorrectly adds trailing slashes to base URLs without
paths. This behavior is being fixed in pydantic-core PR #1719 and will
be available in Pydantic 2.12+.

Instead of working around the issue, mark the test as expected to fail.
This documents the known bug and will automatically alert when Pydantic
fixes it (the test will XPASS with xfail_strict=true in pyproject.toml).

Ref: pydantic/pydantic-core#1719
@felixweinberger felixweinberger marked this pull request as ready for review July 14, 2025 14:12
@felixweinberger felixweinberger requested a review from Kludex July 14, 2025 14:12
@felixweinberger felixweinberger merged commit 4a6fbd3 into fix-test-with-snapshot Jul 14, 2025
17 of 18 checks passed
@felixweinberger felixweinberger deleted the fix-test-with-trailing-slash branch July 14, 2025 14:26
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.

2 participants