error in the tests

Martin Pool mbp at sourcefrog.net
Fri Jan 6 04:29:51 GMT 2006


On Thu, 2006-01-05 at 21:32 -0600, John Arbash Meinel wrote:

> Well, I'm doing 2 things in my encodings branch.
> 
> First, I'm adding an encoding= parameter to TestCase.run_bzr_captured
> Second, I'm modifying Command() so that it has an 'outf' attribute.
> Which is set for the correct encoding failure based on
> Command.encoding_type()
> 
> So for commands like 'cmd_log' which don't care if they get a few
> details wrong you use:
> 
> class cmd_log(...)
> 
>   encoding_type = 'replace'
> 
>   def run(...):
>     self.outf.write('this will be encoded appropriately.')
> 
> I also provide a type 'exact', which doesn't create an encoding. Because
> something like 'diff' needs to be more creative with how it writes out
> text. It would probably want to encode any filenames, but *doesn't* want
> to encode the raw text of files.
> 
> I'm pretty happy with it so far. If you feel I'm taking a bad path, let
> me know.

That sounds good.

-- 
Martin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060106/d348537e/attachment.pgp 


More information about the bazaar mailing list