diff options
author | Jelle Zijlstra <jelle.zijlstra@gmail.com> | 2024-06-11 13:06:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-11 13:06:49 (GMT) |
commit | 9b8611eeea172cd4aa626ccd1ca333dc4093cd8c (patch) | |
tree | 93491345df33ac20e4c4e87f226ff7a7e781e465 /Lib/test/test_traceback.py | |
parent | 02c1dfff073a3dd6ce34a11b038defde291c2203 (diff) | |
download | cpython-9b8611eeea172cd4aa626ccd1ca333dc4093cd8c.zip cpython-9b8611eeea172cd4aa626ccd1ca333dc4093cd8c.tar.gz cpython-9b8611eeea172cd4aa626ccd1ca333dc4093cd8c.tar.bz2 |
gh-119180: PEP 649 compiler changes (#119361)
Diffstat (limited to 'Lib/test/test_traceback.py')
-rw-r--r-- | Lib/test/test_traceback.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py index 5035de1..1895c88 100644 --- a/Lib/test/test_traceback.py +++ b/Lib/test/test_traceback.py @@ -622,6 +622,7 @@ class TracebackErrorLocationCaretTestBase: def f_with_type(): def foo(a: THIS_DOES_NOT_EXIST ) -> int: return 0 + foo.__annotations__ lineno_f = f_with_type.__code__.co_firstlineno expected_f = ( @@ -629,7 +630,9 @@ class TracebackErrorLocationCaretTestBase: f' File "{__file__}", line {self.callable_line}, in get_exception\n' ' callable()\n' ' ~~~~~~~~^^\n' - f' File "{__file__}", line {lineno_f+1}, in f_with_type\n' + f' File "{__file__}", line {lineno_f+3}, in f_with_type\n' + ' foo.__annotations__\n' + f' File "{__file__}", line {lineno_f+1}, in __annotate__\n' ' def foo(a: THIS_DOES_NOT_EXIST ) -> int:\n' ' ^^^^^^^^^^^^^^^^^^^\n' ) |