Skip to content

✅ Add regression test for ForwardRef in annotated dependency#14808

Open
amulyakh456 wants to merge 3 commits intofastapi:masterfrom
amulyakh456:test-annotated-forwardref
Open

✅ Add regression test for ForwardRef in annotated dependency#14808
amulyakh456 wants to merge 3 commits intofastapi:masterfrom
amulyakh456:test-annotated-forwardref

Conversation

@amulyakh456
Copy link

@amulyakh456 amulyakh456 commented Feb 3, 2026

🧪 Regression Test

This PR adds a regression test covering the use of Annotated parameters
with ForwardRef in dependency injection.

🔍 Context

While investigating an existing issue, I verified that this behavior
works correctly on the current default branch with Python 3.12.
This test documents the expected behavior and guards against regressions.

📎 Related Issue

Refs #14808

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 3, 2026

CodSpeed Performance Report

Merging this PR will not alter performance

Comparing amulyakh456:test-annotated-forwardref (dc0029f) with master (f3f4981)1

Summary

✅ 20 untouched benchmarks

Footnotes

  1. No successful run was found on master (eacbce2) during the generation of this report, so f3f4981 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@YuriiMotov
Copy link
Member

@amulyakh456, thanks for your interest!
Could you please move this test into a separate module (e.g. test_forwardref_in_annotation)?
test_dependency_wrapped.py is for a bit different thing.

@YuriiMotov YuriiMotov changed the title Add regression test for Annotated ForwardRef dependency ✅ Add regression test for ForwardRef in annotated dependency Feb 3, 2026
@amulyakh456
Copy link
Author

Thanks for the review!
I’ve moved the ForwardRef annotated dependency test to a dedicated module as suggested.
Happy to make further adjustments if needed.

@github-actions github-actions bot removed the waiting label Feb 4, 2026
@YuriiMotov
Copy link
Member

@amulyakh456, now we have 2 copies of this test..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants