TextTestRunner should replace unprintable characters rather than falling over

Bug #633216 reported by Martin Packman
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Medium
Martin Packman

Bug Description

Splitting this out from bug 632387, when running on a non-utf8 console it's preferable to print question marks rather than abort the test run with a UnicodeEncodeError when outputting results not in the current encoding. This could lead to confusing output like "AssertionError: '?' != '?'" but test output we really care about tends to be using subunit already.

Tags: selftest

Related branches

Martin Packman (gz)
Changed in bzr:
assignee: nobody → Martin [gz] (gz)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Vincent Ladeuil (vila) wrote :

Can't we use some \xnnn escaping instead ?
Anyway, first of all selftest should complete, we can see for further enhancements from that but if using ??? make tests
always fail, I think we should fix it more ;)

Revision history for this message
Martin Packman (gz) wrote :

Sure. Can still lead to confusing output like "AssertionError: '\uffff' != '\uffff'" but you're right it's probably a better option.

Martin Packman (gz)
Changed in bzr:
status: Confirmed → In Progress
Martin Packman (gz)
Changed in bzr:
milestone: none → 2.3b4
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.