Align 'assertEqual' output
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
testtools |
Fix Released
|
Wishlist
|
Jonathan Lange |
Bug Description
When using assertEqual on content that is a reasonable sized string, it is really nice to have the strings lined up vertically, to make it clear what bit does not match. Right now the output is:
reference = 'd\x00\
actual = 'd\x00\
Which makes it hard to see what byte is actually different. If you changed it to:
reference = 'd\x00\
actual = 'd\x00\
(You need a fixed width font, and not Launchpad's rendering of the above)
Then the columns match up and it is easy to detect the one character which is different.
Related branches
- testtools committers: Pending requested
-
Diff: 82 lines (+8/-8)3 files modifiedtesttools/matchers.py (+1/-1)
testtools/tests/test_matchers.py (+5/-5)
testtools/tests/test_testcase.py (+2/-2)
Changed in testtools: | |
status: | Triaged → In Progress |
assignee: | nobody → Jonathan Lange (jml) |
Changed in testtools: | |
status: | In Progress → Fix Committed |
milestone: | none → next |
Changed in testtools: | |
status: | Fix Committed → Fix Released |
What John means is 'add some spaces after 'actual' to pad it the same length as reference.