Skip to content

tests: use inline_snapshot.Is on parametrized test #945

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Kludex
Copy link
Member

@Kludex Kludex commented Jun 12, 2025

cc @agronholm

This PR just uses inline_snapshots properly on a parametrized test.

@Kludex Kludex mentioned this pull request Jun 12, 2025
9 tasks
@agronholm
Copy link

Looks like the tests are still failing though?

@agronholm
Copy link

That one failure looks like just a flaky test.

@Kludex
Copy link
Member Author

Kludex commented Jun 12, 2025

Now the test is fixed... But it's failing correctly... 😅

The AnyUrl adds a very annoying trailing slash. @Viicos how is that going on the Pydantic side?

@Viicos
Copy link

Viicos commented Jun 12, 2025

The AnyUrl adds a very annoying trailing slash. @Viicos how is that going on the Pydantic side?

In progress in pydantic/pydantic-core#1719, but anyway this will only be included in 2.12.

@agronholm
Copy link

Now the test is fixed... But it's failing correctly... 😅

The AnyUrl adds a very annoying trailing slash. @Viicos how is that going on the Pydantic side?

If you access the MCP server without the trailing slash, it will redirect you to a URL with the slash added.

@Kludex
Copy link
Member Author

Kludex commented Jun 12, 2025

Now the test is fixed... But it's failing correctly... 😅
The AnyUrl adds a very annoying trailing slash. @Viicos how is that going on the Pydantic side?

If you access the MCP server without the trailing slash, it will redirect you to a URL with the slash added.

Are you saying this is working as expected?

@agronholm
Copy link

Now the test is fixed... But it's failing correctly... 😅
The AnyUrl adds a very annoying trailing slash. @Viicos how is that going on the Pydantic side?

If you access the MCP server without the trailing slash, it will redirect you to a URL with the slash added.

Are you saying this is working as expected?

I have no idea how the test is supposed to work, TBH. I just observed a lot of redirects happening in the test suite when the forward slash is missing from the end of the URI.

@Kludex
Copy link
Member Author

Kludex commented Jun 12, 2025

It's a Starlette thing. There's another PR that fixes the redirect behavior.

@Kludex Kludex requested a review from ihrpr June 13, 2025 08:38
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.

3 participants