Skip to content

Conversation

@dr-carlos
Copy link
Contributor

@dr-carlos dr-carlos commented Nov 7, 2025

All lines in call_annotate_function() should now be covered.
This PR includes an added test for call_evaluate_function() as this just calls call_annotate_function() under the hood and some of its code paths weren't being tested.

@JelleZijlstra
Copy link
Member

One test is failing, could you take a look?

@dr-carlos
Copy link
Contributor Author

One test is failing, could you take a look?

Fixed.

@JelleZijlstra JelleZijlstra merged commit 1110e8f into python:main Nov 10, 2025
44 checks passed
@miss-islington-app
Copy link

Thanks @dr-carlos for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Nov 10, 2025
…t coverage (pythonGH-141176)

* Test passing unsupported Format values to call_annotate_function()

* Test call_evaluate_function with fake globals that raise errors

* Fix typo and comparison in test_fake_global_evaluation
(cherry picked from commit 1110e8f)

Co-authored-by: dr-carlos <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Nov 10, 2025

GH-141355 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label Nov 10, 2025
JelleZijlstra pushed a commit that referenced this pull request Nov 10, 2025
…st coverage (GH-141176) (#141355)

gh-141174: Improve `annotationlib.call_annotate_function()` test coverage (GH-141176)

* Test passing unsupported Format values to call_annotate_function()

* Test call_evaluate_function with fake globals that raise errors

* Fix typo and comparison in test_fake_global_evaluation
(cherry picked from commit 1110e8f)

Co-authored-by: dr-carlos <[email protected]>
@dr-carlos dr-carlos deleted the call-annotate-tests branch November 10, 2025 22:02
StanFromIreland pushed a commit to StanFromIreland/cpython that referenced this pull request Dec 6, 2025
…t coverage (python#141176)

* Test passing unsupported Format values to call_annotate_function()

* Test call_evaluate_function with fake globals that raise errors

* Fix typo and comparison in test_fake_global_evaluation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants