Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #31063: Fix a test failure with readline 8.1
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. URL: https://trac.sagemath.org/31063 Reported by: arojas Ticket author(s): Antonio Rojas Reviewer(s): Matthias Koeppe
- Loading branch information