gh-105724: Add location information to assert errors#105935
Merged
markshannon merged 5 commits intopython:mainfrom Aug 16, 2023
Merged
gh-105724: Add location information to assert errors#105935markshannon merged 5 commits intopython:mainfrom
assert errors#105935markshannon merged 5 commits intopython:mainfrom
Conversation
Member
|
|
iritkatriel
reviewed
Jun 20, 2023
| ), | ||
| ('assert 1 > 2 and 3 > 2', | ||
| [ | ||
| ' assert 1 > 2 and 3 > 2', |
Member
There was a problem hiding this comment.
Would be nice if it was possible to show which of these has failed.
Member
There was a problem hiding this comment.
It would be. But that's for another PR, IMO.
I'll elaborate on the issue.
fnordahl
added a commit
to fnordahl/ovs
that referenced
this pull request
Apr 8, 2024
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 <fnordahl@ubuntu.com>
ovsrobot
pushed a commit
to ovsrobot/ovs
that referenced
this pull request
Apr 8, 2024
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 <fnordahl@ubuntu.com> Signed-off-by: 0-day Robot <robot@bytheb.org>
igsilya
pushed a commit
to igsilya/ovs
that referenced
this pull request
Apr 9, 2024
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 <fnordahl@ubuntu.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
igsilya
pushed a commit
to igsilya/ovs
that referenced
this pull request
Apr 9, 2024
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 <fnordahl@ubuntu.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
igsilya
pushed a commit
to igsilya/ovs
that referenced
this pull request
Apr 9, 2024
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 <fnordahl@ubuntu.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
igsilya
pushed a commit
to igsilya/ovs
that referenced
this pull request
Apr 9, 2024
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 <fnordahl@ubuntu.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
igsilya
pushed a commit
to igsilya/ovs
that referenced
this pull request
Apr 9, 2024
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 <fnordahl@ubuntu.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
igsilya
pushed a commit
to igsilya/ovs
that referenced
this pull request
Apr 9, 2024
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 <fnordahl@ubuntu.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
roseoriorden
pushed a commit
to roseoriorden/ovs
that referenced
this pull request
Jul 1, 2024
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 <fnordahl@ubuntu.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New error message for
assert 1 > 2is:I've also included test cases where
asserttakes multiple lines.assertandAssertionErrorby adding location information #105724