-
-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
gh-105724: Add location information to assert
errors
#105935
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Thanks.
|
), | ||
('assert 1 > 2 and 3 > 2', | ||
[ | ||
' assert 1 > 2 and 3 > 2', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be nice if it was possible to show which of these has failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be. But that's for another PR, IMO.
I'll elaborate on the issue.
The vlog - Python3 test makes use of output from Python Tracebacks in its test assertion. In Python 3.13 a line with tophat (``^``) markers is added below Tracebacks from calls to assert [0], which makes the test fail. This change of behavior is also backported to the Python 3.12 and 3.11 stable branches [1]. Strip lines containing one or more occurence of the ``^`` character from the output before performing the test assertions. 0: python/cpython#105935 1: python/cpython#116034 Reported-at: https://launchpad.net/bugs/2060434 Signed-off-by: Frode Nordahl <[email protected]>
The vlog - Python3 test makes use of output from Python Tracebacks in its test assertion. In Python 3.13 a line with tophat (``^``) markers is added below Tracebacks from calls to assert [0], which makes the test fail. This change of behavior is also backported to the Python 3.12 and 3.11 stable branches [1]. Strip lines containing one or more occurence of the ``^`` character from the output before performing the test assertions. 0: python/cpython#105935 1: python/cpython#116034 Reported-at: https://launchpad.net/bugs/2060434 Signed-off-by: Frode Nordahl <[email protected]> Signed-off-by: 0-day Robot <[email protected]>
The vlog - Python3 test makes use of output from Python Tracebacks in its test assertion. In Python 3.13 a line with tophat (``^``) markers is added below Tracebacks from calls to assert [0], which makes the test fail. This change of behavior is also backported to the Python 3.12 and 3.11 stable branches [1]. Strip lines containing one or more occurrence of the ``^`` character from the output before performing the test assertions. 0: python/cpython#105935 1: python/cpython#116034 Reported-at: https://launchpad.net/bugs/2060434 Signed-off-by: Frode Nordahl <[email protected]> Signed-off-by: Ilya Maximets <[email protected]>
The vlog - Python3 test makes use of output from Python Tracebacks in its test assertion. In Python 3.13 a line with tophat (``^``) markers is added below Tracebacks from calls to assert [0], which makes the test fail. This change of behavior is also backported to the Python 3.12 and 3.11 stable branches [1]. Strip lines containing one or more occurrence of the ``^`` character from the output before performing the test assertions. 0: python/cpython#105935 1: python/cpython#116034 Reported-at: https://launchpad.net/bugs/2060434 Signed-off-by: Frode Nordahl <[email protected]> Signed-off-by: Ilya Maximets <[email protected]>
The vlog - Python3 test makes use of output from Python Tracebacks in its test assertion. In Python 3.13 a line with tophat (``^``) markers is added below Tracebacks from calls to assert [0], which makes the test fail. This change of behavior is also backported to the Python 3.12 and 3.11 stable branches [1]. Strip lines containing one or more occurrence of the ``^`` character from the output before performing the test assertions. 0: python/cpython#105935 1: python/cpython#116034 Reported-at: https://launchpad.net/bugs/2060434 Signed-off-by: Frode Nordahl <[email protected]> Signed-off-by: Ilya Maximets <[email protected]>
The vlog - Python3 test makes use of output from Python Tracebacks in its test assertion. In Python 3.13 a line with tophat (``^``) markers is added below Tracebacks from calls to assert [0], which makes the test fail. This change of behavior is also backported to the Python 3.12 and 3.11 stable branches [1]. Strip lines containing one or more occurrence of the ``^`` character from the output before performing the test assertions. 0: python/cpython#105935 1: python/cpython#116034 Reported-at: https://launchpad.net/bugs/2060434 Signed-off-by: Frode Nordahl <[email protected]> Signed-off-by: Ilya Maximets <[email protected]>
The vlog - Python3 test makes use of output from Python Tracebacks in its test assertion. In Python 3.13 a line with tophat (``^``) markers is added below Tracebacks from calls to assert [0], which makes the test fail. This change of behavior is also backported to the Python 3.12 and 3.11 stable branches [1]. Strip lines containing one or more occurrence of the ``^`` character from the output before performing the test assertions. 0: python/cpython#105935 1: python/cpython#116034 Reported-at: https://launchpad.net/bugs/2060434 Signed-off-by: Frode Nordahl <[email protected]> Signed-off-by: Ilya Maximets <[email protected]>
The vlog - Python3 test makes use of output from Python Tracebacks in its test assertion. In Python 3.13 a line with tophat (``^``) markers is added below Tracebacks from calls to assert [0], which makes the test fail. This change of behavior is also backported to the Python 3.12 and 3.11 stable branches [1]. Strip lines containing one or more occurrence of the ``^`` character from the output before performing the test assertions. 0: python/cpython#105935 1: python/cpython#116034 Reported-at: https://launchpad.net/bugs/2060434 Signed-off-by: Frode Nordahl <[email protected]> Signed-off-by: Ilya Maximets <[email protected]>
The vlog - Python3 test makes use of output from Python Tracebacks in its test assertion. In Python 3.13 a line with tophat (``^``) markers is added below Tracebacks from calls to assert [0], which makes the test fail. This change of behavior is also backported to the Python 3.12 and 3.11 stable branches [1]. Strip lines containing one or more occurrence of the ``^`` character from the output before performing the test assertions. 0: python/cpython#105935 1: python/cpython#116034 Reported-at: https://launchpad.net/bugs/2060434 Signed-off-by: Frode Nordahl <[email protected]> Signed-off-by: Ilya Maximets <[email protected]>
New error message for
assert 1 > 2
is:I've also included test cases where
assert
takes multiple lines.assert
andAssertionError
by adding location information #105724