TextTestRunner should replace unprintable characters rather than falling over
Bug #633216 reported by
Martin Packman
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.
Related branches
lp:~gz/bzr/escape_selftest_console_output_633216
- Vincent Ladeuil: Needs Information
- Martin Pool: Approve
-
Diff: 73 lines (+31/-3)3 files modifiedbzrlib/tests/__init__.py (+6/-3)
bzrlib/tests/test_selftest.py (+17/-0)
doc/en/release-notes/bzr-2.3.txt (+8/-0)
Changed in bzr: | |
assignee: | nobody → Martin [gz] (gz) |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in bzr: | |
status: | Confirmed → In Progress |
Changed in bzr: | |
milestone: | none → 2.3b4 |
status: | In Progress → Fix Released |
To post a comment you must log in.
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 ;)