Skip to content
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

Fix a test failure with readline 8.1 #31063

Closed
antonio-rojas opened this issue Dec 16, 2020 · 8 comments
Closed

Fix a test failure with readline 8.1 #31063

antonio-rojas opened this issue Dec 16, 2020 · 8 comments

Comments

@antonio-rojas
Copy link
Contributor

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.

CC: @kiwifb @mkoeppe @isuruf @EmmanuelCharpentier

Component: packages: standard

Author: Antonio Rojas

Branch/Commit: e294182

Reviewer: Matthias Koeppe

Issue created by migration from https://trac.sagemath.org/ticket/31063

@antonio-rojas antonio-rojas added this to the sage-9.3 milestone Dec 16, 2020
@antonio-rojas
Copy link
Contributor Author

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 16, 2020

Commit: e294182

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Dec 16, 2020

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

e294182Fix tests with readline 6.1

@antonio-rojas

This comment has been minimized.

@antonio-rojas
Copy link
Contributor Author

Author: Antonio Rojas

@antonio-rojas antonio-rojas changed the title Fix a test failure with readline 6.1 Fix a test failure with readline 8.1 Dec 16, 2020
@antonio-rojas

This comment has been minimized.

@mkoeppe
Copy link
Member

mkoeppe commented Dec 16, 2020

Reviewer: Matthias Koeppe

@vbraun
Copy link
Member

vbraun commented Dec 27, 2020

Changed branch from u/arojas/fix_a_test_failure_with_readline_6_1 to e294182

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants