Skip to content

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

Merged
JelleZijlstra merged 3 commits into
python:mainfrom
dr-carlos:call-annotate-tests
Nov 10, 2025
Merged

gh-141174: Improve annotationlib.call_annotate_function() test coverage#141176
JelleZijlstra merged 3 commits into
python:mainfrom
dr-carlos:call-annotate-tests

Conversation

@dr-carlos

@dr-carlosdr-carlos commented Nov 7, 2025

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member

One test is failing, could you take a look?

@dr-carlos

Copy link
Copy Markdown
ContributorAuthor

One test is failing, could you take a look?

Fixed.

@JelleZijlstra
JelleZijlstra merged commit 1110e8f into python:mainNov 10, 2025
44 checks passed
@miss-islington-app

Copy link
Copy Markdown

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 <77367421+dr-carlos@users.noreply.github.com>
@bedevere-app

Copy link
Copy Markdown

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

@bedevere-appbedevere-appBot 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 <77367421+dr-carlos@users.noreply.github.com>
@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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip newstestsTests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@dr-carlos@JelleZijlstra