[MERGE] More robust handling of encoding issues in tests.

John Arbash Meinel john at arbash-meinel.com
Wed Aug 6 23:53:00 BST 2008


John Arbash Meinel has voted approve.
Status is now: Semi-approved
Comment:
I originally thought that assertEqualDiff should be 8-bit only, but it 
is useful enough that I'm not as sure anymore. Specifically, if you have 
Revision.message that you want to compare, assertEqualDiff works really 
well there.

I've also used it when I actually have a really long list of say 
integers. So when the test fails, instead of having to try and compare 
two really big lists, I do:

self.assertEqualDiff('\n'.join(map(str, list1)), ...)

All this to say, I'm don't think we need to be strict on type to 
assertEqualDiff.

I'm curious what spawned this, considering I don't think I've seen tests 
failing because they couldn't print unicode (certainly test names are 
pretty much strictly ascii only.)

For details, see: 
http://bundlebuggy.aaronbentley.com/project/bzr/request/%3C48733815.40704%40gmx.net%3E
Project: Bazaar



More information about the bazaar mailing list