[RFC] Strange test suite behavior

Martin Pool mbp at sourcefrog.net
Fri Sep 14 01:42:48 BST 2007


On 9/14/07, Vincent Ladeuil <v.ladeuil+lp at free.fr> wrote:
> I had a strange behavior in the test suite.
>
> TestCaseWithMemoryTransport creates a test root directory under
> /tmp. Under that directory it creates a .bzr directory to protect
> the source directory real branch (by the way this may be a bit
> outdated, but I digress).

Yes, having this is not so necessary now that we put the test
directories in $TMPDIR.  It might still possibly be useful if people
have $TMPDIR set to ~/tmp and have a repository in their home
directory.  Anyhow it is more useful with your patch.

> I wrote a test that updated that .bzr directory by mistake (the
> test is still valid and was failing before the associate fix
> which explain why I didn't notice it earlier).

:
-            self.addError(test, test.__exc_info())
+            self.addError(test, test._exc_info())

OK, this now matches the function in unittest.py; it's unlikely that
it was working properly before.

I approve the patch -- you should have said [merge].

> But if you try it against a recent bzr.dev, you will notice that
> the log associated with failing test mentions far more than it
> should.

What do you mean?

-- 
Martin



More information about the bazaar mailing list