| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
Thanks @dr-carlos for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15. |
Sorry, something went wrong.
|
GH-155711 is a backport of this pull request to the 3.15 branch. |
Sorry, something went wrong.
|
GH-155712 is a backport of this pull request to the 3.14 branch. |
Sorry, something went wrong.
…x in `Interpolation` (GH-155661) (#155712) gh-141174: Test `type_repr()` of `Template` with invalid syntax in `Interpolation` (GH-155661) Test `type_repr()` of `Template` with invalid syntax in `Interpolation` (cherry picked from commit 5cc9e46) Co-authored-by: dr-carlos <77367421+dr-carlos@users.noreply.github.com>
… in `Interpolation` (python#155661) Test `type_repr()` of `Template` with invalid syntax in `Interpolation`
| Back | FazBrowse Home | New Git URL |
Currently, there is no test in test_annotationlib.py of the following lines:
cpython/Lib/annotationlib.py
Lines 643 to 644 in 025e7d2
These ensure that a reasonable value is returned when stringifying a Template annotation containing invalid syntax.
This could be tested for both get_annotations(format=Format.STRING) and type_repr(). But, it's impossible from a syntactic t-string and only possbile through artificial Template construction, which is only currently tested within the type_repr() tests. So I've only added a test there. Happy to add them in other places if that's required.