Repository navigation
test(pydantic): remove stale xfail from field extension default test - #4787
nikhillakra2007-tech wants to merge 3 commits into
Conversation
Default values on fields declared in the class body of a pydantic type have worked since strawberry-graphql#826, and strawberry-graphql#829 was closed as fixed in 2021. The test kept its xfail marker and a stale field-order expectation (model fields first) that contradicts both current behavior and the sibling nested-fields test, which asserts extension fields come first. Update the assertion to the order verified by the sibling test and remove the marker, so the suite verifies the default behavior directly.
[Low impact] This test-only change appears safe to merge. SummaryRemoves the stale
Reviews (1) · Last reviewed commit: "test(pydantic): un-xfail field extension..." · Reviewed by Greptile |
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="tests/experimental/pydantic/test_basic.py" line_range="430" />
<code_context>
assert empty_list == []
-@pytest.mark.xfail(
</code_context>
<issue_to_address>
**Release notes are missing**
`RELEASE.md` is absent from this PR, so the required release description is missing for the automated release process.
Add a `RELEASE.md` describing the change.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: tests/experimental/pydantic/test_basic.py:430
|
Thanks for adding the Below is the changelog that will be used for the release. This release fixes the Pydantic field-extension default test by removing its This release was contributed by @nikhillakra2007-tech in #4787 |
Back in 2021 this test was marked as an expected failure because default values didn't work when extending a pydantic type (#829). That was fixed not long after and the issue was closed, but the marker stayed, and the test's field-order assertion (model fields first) no longer matches the behavior covered by the sibling nested-fields test, where extension fields come first.
This updates the assertion to the actual order and drops the marker, so the test now runs for real and confirms defaults work.
Test plan:
No RELEASE.md since this is a test-only change - happy to add one if you'd like.
Summary by Sourcery
Tests: