Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Comments

✅ Simplify tests for response_model#14062

Merged
tiangolo merged 1 commit intofastapi:masterfrom
dynamicy:tests-tutorial-tasks
Sep 20, 2025
Merged

✅ Simplify tests for response_model#14062
tiangolo merged 1 commit intofastapi:masterfrom
dynamicy:tests-tutorial-tasks

Conversation

@dynamicy
Copy link
Contributor

svlandeg reacted with rocket emoji
@dynamicydynamicy marked this pull request as ready for reviewSeptember 10, 2025 15:59
@svlandeg
Copy link
Member

Hi! Could you look into the failing tests for Python 3.8?

dynamicy reacted with thumbs up emoji

@svlandegsvlandeg marked this pull request as draftSeptember 11, 2025 17:44
@svlandegsvlandeg changed the titleSimplify tests for parametrize response model tutorial✅ Simplify response model tests by usingpytest.mark.parametrizeSep 12, 2025
@dynamicydynamicy marked this pull request as ready for reviewSeptember 12, 2025 09:49
@dynamicy
Copy link
ContributorAuthor

Hi@svlandeg,
I’ve fixed the issues causing the Python 3.8 test failures — everything should be working now.
Please let me know if you spot anything else!

svlandeg reacted with thumbs up emoji

@svlandegsvlandeg self-assigned thisSep 12, 2025
@svlandegsvlandeg changed the title✅ Simplify response model tests by usingpytest.mark.parametrize✅ Simplify tests for response_modelSep 12, 2025
svlandeg
svlandeg previously requested changesSep 12, 2025
Copy link
Member

@svlandegsvlandeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks for looking into this,@dynamicy!

I'm not quite sure I understand why you're rewriting
client = TestClient(app)

to aget_client function that yields severalTestClientobjects, even when there's only one. In fact, I don't think we need to change the test files that don't have variants of them (which is the focus of#13150)

Have a look athttps://github.com/fastapi/fastapi/pull/13197/files for instance. Theget_client method becomes something like this:

@pytest.fixture(    name="client",    params=[        "tutorial001",        pytest.param("tutorial001_py310", marks=needs_py310),    ],)def get_client(request: pytest.FixtureRequest):    mod = importlib.import_module(f"docs_src.schema_extra_example.{request.param}")    client = TestClient(mod.app)    return client

I suggest to keep to this style for consistency across the code base. Then most of the edits of this PR can be removed, and we can focus on the files that actually have code variants for Python 3.10 and clean those up.

dynamicy reacted with thumbs up emoji
@svlandegsvlandeg removed their assignmentSep 12, 2025
@svlandegsvlandeg marked this pull request as draftSeptember 12, 2025 10:26
@dynamicydynamicy marked this pull request as ready for reviewSeptember 12, 2025 18:23
@dynamicy
Copy link
ContributorAuthor

Thanks for the feedback,@svlandeg! Thanks for pointing me to the right direction!

svlandeg reacted with thumbs up emoji

Copy link
Member

@svlandegsvlandeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This now looks good to me, thanks@dynamicy !

dynamicy reacted with thumbs up emoji
@svlandegsvlandeg removed their assignmentSep 13, 2025
@svlandegsvlandeg self-assigned thisSep 16, 2025
@svlandeg
Copy link
Member

svlandeg commentedSep 16, 2025
edited
Loading

@dynamicy: this was already approved and ready to merge, but now I see that a change has been force-pushed. I generally dislike force pushes because it doesn't allow a reviewer to track the history. What have you changed on this PR since my approval?

Just to clarify: there's really no need to obliterate the history of a PR. We squash right before merging anyway.

@dynamicy
Copy link
ContributorAuthor

Thanks for the heads-up! GitHub showed a notice that the branch was out of date with the base, so I used the Rebase and update option in the UI. That resulted in a force-push of the rebased commits.
There are no functional changes since the approval—only the base was updated (rebased). Sorry for the noise and any inconvenience.
I’m happy to avoid rebasing/force-pushing here going forward and leave base updates to maintainers (we’ll squash on merge anyway). Please let me know if you’d like me to do anything else to make the review easier.

Copy link
Member

@svlandegsvlandeg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Ok cool, thanks for the explanation! Had another look and confirmed all is still good to merge here 😎

@svlandegsvlandeg removed their assignmentSep 17, 2025
Copy link
Member

@tiangolotiangolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Nice, thanks! 🚀

And thanks@svlandeg for the review and help! ☕

dynamicy reacted with thumbs up emojisvlandeg reacted with hooray emoji
@tiangolotiangolo merged commit11d424c intofastapi:masterSep 20, 2025
29 checks passed
@dynamicydynamicy mentioned this pull requestSep 20, 2025
1 task
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@tiangolotiangolotiangolo approved these changes

@svlandegsvlandegsvlandeg approved these changes

Assignees

No one assigned

Labels

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@dynamicy@svlandeg@tiangolo

[8]ページ先頭

©2009-2026 Movatter.jp