Skip to content

Commit

Permalink
tests: Fix compatibility issue with Python 3.13 in vlog.at.
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
fnordahl authored and ovsrobot committed Apr 8, 2024
1 parent 95f5012 commit 58f8659
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tests/vlog.at
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ AT_CHECK([$PYTHON3 $srcdir/test-vlog.py --log-file log_file \

AT_CHECK([sed -e 's/.*-.*-.*T..:..:..Z |//' \
-e 's/File ".*", line [[0-9]][[0-9]]*,/File <name>, line <number>,/' \
-e '/\^\+/d' \
stderr_log], [0], [dnl
0 | module_0 | EMER | emergency
1 | module_0 | ERR | error
Expand Down

0 comments on commit 58f8659

Please sign in to comment.