-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
gh-141174: Improve ForwardRef test coverage
#141175
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
Conversation
|
Thanks @dr-carlos for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
|
Thanks @dr-carlos for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
* Test unsupported format in ForwardRef.evaluate() * Test dict cell closure with multiple variables * Test all options in ForwardRef repr * Test ForwardRef being a final class (cherry picked from commit 19b573025e0aa569e7a34081116280133e33979a) Co-authored-by: dr-carlos <77367421+dr-carlos@users.noreply.github.com>
|
GH-141354 is a backport of this pull request to the 3.14 branch. |
* Test unsupported format in ForwardRef.evaluate() * Test dict cell closure with multiple variables * Test all options in ForwardRef repr * Test ForwardRef being a final class (cherry picked from commit 19b5730) Co-authored-by: dr-carlos <77367421+dr-carlos@users.noreply.github.com>
|
Sorry @dr-carlos and @JelleZijlstra, I had trouble completing the backport. |
…1354) gh-141174: Improve `ForwardRef` test coverage (GH-141175) * Test unsupported format in ForwardRef.evaluate() * Test dict cell closure with multiple variables * Test all options in ForwardRef repr * Test ForwardRef being a final class (cherry picked from commit 19b5730) Co-authored-by: dr-carlos <77367421+dr-carlos@users.noreply.github.com>
All lines in the
ForwardRefclass (except_evaluate) should now be covered by tests, exceptcpython/Lib/annotationlib.py
Lines 146 to 147 in 42d0140
I couldn't think of a useful test for those lines that wouldn't involve using the undocumented
ForwardRefconstructor (as the owner is automatically applied byannotationlib.get_annotations()).