#31063 closed defect (fixed)

Fix a test failure with readline 8.1

Reported by: arojas Owned by:
Priority: major Milestone: sage-9.3
Component: packages: standard Keywords:
Cc: fbissey, mkoeppe, isuruf, charpent 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 arojas)

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 12 months ago by arojas

  • Branch set to u/arojas/fix_a_test_failure_with_readline_6_1

comment:2 Changed 12 months ago by git

  • Commit set to e2941823d986a5a8116140c6c61287315ef7f71a

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

e294182Fix tests with readline 6.1

comment:3 Changed 12 months ago by arojas

  • Authors set to Antonio Rojas
  • Cc fbissey mkoeppe isuruf charpent added
  • Component changed from PLEASE CHANGE to packages: standard
  • Description modified (diff)
  • Status changed from new to needs_review
  • Summary changed from Fix a test failure with readline 6.1 to Fix a test failure with readline 8.1
  • Type changed from PLEASE CHANGE to defect

comment:4 Changed 12 months ago by arojas

  • Description modified (diff)

comment:5 Changed 12 months ago by mkoeppe

  • Reviewers set to Matthias Koeppe
  • Status changed from needs_review to positive_review

comment:6 Changed 11 months ago by vbraun

  • Branch changed from u/arojas/fix_a_test_failure_with_readline_6_1 to e2941823d986a5a8116140c6c61287315ef7f71a
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.