Opened 2 years ago

Closed 2 years ago

#31063 closed defect (fixed)

Fix a test failure with readline 8.1

Reported by: Antonio Rojas Owned by:
Priority: major Milestone: sage-9.3
Component: packages: standard Keywords:
Cc: François Bissey, Matthias Köppe, Isuru Fernando, Emmanuel Charpentier Merged in:
Authors: Antonio Rojas Reviewers: Matthias Koeppe
Report Upstream: N/A Work issues:
Branch: e294182 (Commits, GitHub, GitLab) Commit: e2941823d986a5a8116140c6c61287315ef7f71a
Dependencies: Stopgaps:

Status badges

Description (last modified by Antonio Rojas)

readline 8.1 seems to print more escape characters in raw mode, which causes a test failure in misc/trace.py

File "/usr/lib/python3.9/site-packages/sage/misc/trace.py", line 66, in sage.misc.trace.trace
Failed example:
    print(s.before[s.before.find(b'--'):].decode())
Expected:
    --...
    ipdb> c
    2 * 5
Got:
    --Call--
    > <CSI-0;32m>/usr/lib/python3.9/site-packages/sage/arith/misc.py<CSI-0m>(2422)<CSI-0;36m>factor<CSI-0;34m>()<CSI-0m>
    <CSI-0;32m>   2420 <CSI-0;31m><CSI-0;34m><CSI-0m><CSI-0m>
    <CSI-0m><CSI-0;32m>   2421 <CSI-0;31m><CSI-0;34m><CSI-0m><CSI-0m>
    <CSI-0m><CSI-0;32m>-> 2422 <CSI-0;31m><CSI-0;32m>def<CSI-0m> <CSI-0m>factor<CSI-0m><CSI-0;34m>(<CSI-0m><CSI-0m>n<CSI-0m><CSI-0;34m>,<CSI-0m> <CSI-0m>proof<CSI-0m><CSI-0;34m>=<CSI-0m><CSI-0;32m>None<CSI-0m><CSI-0;34m>,<CSI-0m> <CSI-0m>int_<CSI-0m><CSI-0;34m>=<CSI-0m><CSI-0;32m>False<CSI-0m><CSI-0;34m>,<CSI-0m> <CSI-0m>algorithm<CSI-0m><CSI-0;34m>=<CSI-0m><CSI-0;34m>'pari'<CSI-0m><CSI-0;34m>,<CSI-0m> <CSI-0m>verbose<CSI-0m><CSI-0;34m>=<CSI-0m><CSI-0;36m>0<CSI-0m><CSI-0;34m>,<CSI-0m> <CSI-0;34m>**<CSI-0m><CSI-0m>kwds<CSI-0m><CSI-0;34m>)<CSI-0m><CSI-0;34m>:<CSI-0m><CSI-0;34m><CSI-0m><CSI-0;34m><CSI-0m><CSI-0m>
    <CSI-0m><CSI-0;32m>   2423 <CSI-0;31m>    """
    <CSI-0m><CSI-0;32m>   2424 <CSI-0;31m>    <CSI-0m>Return<CSI-0m> <CSI-0m>the<CSI-0m> <CSI-0m>factorization<CSI-0m> <CSI-0m>of<CSI-0m><CSI-0;31m> <CSI-0m><CSI-0;31m>`<CSI-0m><CSI-0;31m>`<CSI-0m><CSI-0m>n<CSI-0m><CSI-0;31m>`<CSI-0m><CSI-0;31m>`<CSI-0m><CSI-0;34m>.<CSI-0m>  <CSI-0m>The<CSI-0m> <CSI-0m>result<CSI-0m> <CSI-0m>depends<CSI-0m> <CSI-0m>on<CSI-0m> <CSI-0m>the<CSI-0m><CSI-0;34m><CSI-0m><CSI-0;34m><CSI-0m><CSI-0m>
    <CSI-0m>
    <CSI-?2004h>ipdb> c
2 * 5CSI-?2004l>
    <BLANKLINE>
**********************************************************************

The trace command being tested here seems to work fine when run manually.

Change History (6)

comment:1 Changed 2 years ago by Antonio Rojas

Branch: u/arojas/fix_a_test_failure_with_readline_6_1

comment:2 Changed 2 years ago by git

Commit: e2941823d986a5a8116140c6c61287315ef7f71a

Branch pushed to git repo; I updated commit sha1. New commits:

e294182Fix tests with readline 6.1

comment:3 Changed 2 years ago by Antonio Rojas

Authors: Antonio Rojas
Cc: François Bissey Matthias Köppe Isuru Fernando Emmanuel Charpentier added
Component: PLEASE CHANGEpackages: standard
Description: modified (diff)
Status: newneeds_review
Summary: Fix a test failure with readline 6.1Fix a test failure with readline 8.1
Type: PLEASE CHANGEdefect

comment:4 Changed 2 years ago by Antonio Rojas

Description: modified (diff)

comment:5 Changed 2 years ago by Matthias Köppe

Reviewers: Matthias Koeppe
Status: needs_reviewpositive_review

comment:6 Changed 2 years ago by Volker Braun

Branch: u/arojas/fix_a_test_failure_with_readline_6_1e2941823d986a5a8116140c6c61287315ef7f71a
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.