[MERGE] Improvements to test_bzrdir

Robert Collins robertc at robertcollins.net
Thu Aug 17 07:30:30 BST 2006


On Thu, 2006-08-17 at 16:23 +1000, Martin Pool wrote:
> On 17 Aug 2006, Robert Collins <robertc at robertcollins.net> wrote:
> > On Thu, 2006-08-17 at 13:53 +1000, Andrew Bennetts wrote:
> > > On Thu, Aug 17, 2006 at 01:47:55PM +1000, Andrew Bennetts wrote:
> > > > This is a bunch of changes I've made to test_bzrdir.py in the process of working
> > > > on the smart server with Martin and Robert.  It does the following things:
> > > 
> > > Again, the patch isn't really empty :)
> > > 
> > > Here's the real one.
> > 
> > Theres a lot of duplicated try:except blocks in there - I suggest a
> > helper function like 'requireWorkingTreeIfLocal(a_bzrdir)' or some such.
> 
> I agree it should be factored out.  Not so sure about that name.  The
> desired behaviour, I think, is:
> 
>  - if the target is not local, the test can't proceed so skip
>  - if it is local, build a working tree
> 
> Perhaps createWorkingTreeOrSkip() then.

There are two separate cases : one that creates a tree, the other that
tries to open one that was created I think.

But I like the name createWorkingTreeOrSkip for thae case of creation.

Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060817/5a95d699/attachment.pgp 


More information about the bazaar mailing list