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

Martin von Gagern Martin.vGagern at gmx.net
Tue Jul 8 10:49:09 BST 2008


Hi Daniel,

Daniel Watkins wrote:
> This all looks good to me.  However, I'd feel more comfortable if it had
> some tests to ensure that _safe_string is definitely returning correctly
> escaped strings.

I just added some tests to the selftest selftest in order to check the
fallback to escaped strings for both TextTestResult.report_* and
TestCase.assertEqualDiff.

The comparisons in assertEqualDiff issue quite a few UnicodeWarnings. As
I can see no way to change the handling of warnings for one test only
and restore the previous state afterwards, and as I don't feel
comfortable changing the global warnings just for a single test, I'd
leave that as it is for now.

Martin Pool suggested stricter type checking for assertEqualDiff in
http://thread.gmane.org/gmane.comp.version-control.bazaar-ng.general/42884/focus=43491
If we really do that, then _safe_string probably won't be needed in
assertEqualDiff any more, and the correspronding test can be dropped
again as well. As this is probably a major change affecting quite a lot
of tests, I would postpone that and live with the warnings for the time
being.

Greetings,
   Martin

P.S.:

I forgot to send to the list. Here is Daniel's reply to my unintended 
personal only mail:

Daniel Watkins wrote:
> This is looking much better.  :)   Core devs won't be able to vote on it
> until you submit it to the list, however.

Good point; resubmitting now. :-)
This also explains why BundleBuggy wouldn't mark my previous submit as 
superseded.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: encodingSafeTests-3528.patch
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20080708/a6041d12/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20080708/a6041d12/attachment.pgp 


More information about the bazaar mailing list