Ticket #1958 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

[with patch, with positive review] fix problems with ANSI codes in sage0.py

Reported by: craigcitro Owned by: craigcitro
Priority: blocker Milestone: sage-2.10.1
Component: interfaces Keywords:
Cc: Author(s):
Report Upstream: Reviewer(s):
Merged in: Work issues:

Description

There were some annoying doctest failures in sage0.py in 2.10.1.rc1, which are due to weird issues with ANSI codes ending up in the result of eval(). This parses them to get the correct answer.

I think there's possibly a deeper readline issue here, but that's mostly wild speculation.

Attachments

1958-sage0-fix.patch Download (1.0 KB) - added by craigcitro 3 years ago.
1958-bandaid-v2.patch Download (0.8 KB) - added by craigcitro 3 years ago.

Change History

Changed 3 years ago by craigcitro

Changed 3 years ago by craigcitro

  • status changed from new to assigned

Changed 3 years ago by mabshoff

There is some more info on #1942, which now has been closed as a dupe of this ticket.

Cheers,

Michael

Changed 3 years ago by craigcitro

Changed 3 years ago by craigcitro

Attached a better band-aid for this, at wstein's suggestion.

Changed 3 years ago by craigcitro

Note: you only want the second patch; it's a *replacement* for the first, not in addition to.

Changed 3 years ago by jsp

Worked for me on Fedoa 7:

sage -t  devel/sage-main/sage/interfaces/sage0.py           ^[[?1034h
         [7.1 s]

----------------------------------------------------------------------
All tests passed!
Total time for all tests: 7.1 seconds

How about the extra escape code on each test line?

Changed 3 years ago by jsp

  • summary changed from [with patch, needs review] fix problems with ANSI codes in sage0.py to [with patch, with positive review] fix problems with ANSI codes in sage0.py

Changed 3 years ago by mabshoff

  • status changed from assigned to closed
  • resolution set to fixed

Merged 1958-bandaid-v2.patch in Sage 2.10.1.rc3

Note: See TracTickets for help on using tickets.