Testsuite problem - brittle test that fails depending on the path

Martin Pool mbp at canonical.com
Mon Feb 5 11:14:23 GMT 2007


On  2 Feb 2007, James Westby <jw+debian at jameswestby.net> wrote:
> My checkout help patch was sent without all the tests passing (cheeky I
> know, but this was the failure):
> 
> errors:
> 'bzr: ERROR: Already a branch: sftp://foo:bar@localhost:44567/home/jw2328/devel/bzr/bzr.dev.helpcheckout/test0000.tmp/blackbox.test_init.TestSFTPInit.test_init_existing_branch/work.\n'
> 
> ^^^^[log from bzrlib.tests.blackbox.test_init.TestSFTPInit.test_init_existing_branch]
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/home/jw2328/devel/bzr/bzr.dev.helpcheckout/bzrlib/tests/blackbox/test_init.py", line 127, in test_init_existing_branch
>     self.assertFalse(re.search(r'checkout', err))
> AssertionError
> 
> The test seems a little brittle to me, but I can't think of a way to
> make it less so.

The error it's trying to catch is 

 bzr: ERROR: Directory contains a branch, but no working tree (use bzr
checkout if you wish to build a working tree): /tmp/foo2

so i will send a trivial change that just adds more words.

Incidentally it would be nice if there were 'bzr init --no-tree' to make
it easier to reproduce this.

-- 
Martin



More information about the bazaar mailing list