[MERGE] Improvements to test_bzrdir

Martin Pool mbp at canonical.com
Thu Aug 17 07:23:27 BST 2006


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.

> With that, I'll be happy to +1 this.

Same.

-- 
Martin




More information about the bazaar mailing list