multiple user ignore setting in test suite...
John Arbash Meinel
john at arbash-meinel.com
Tue Aug 22 19:57:40 BST 2006
Robert Collins wrote:
> I must have missed when this came in:
>
> def test_branch_status_revisions(self):
> """Tests branch status with revisions"""
> wt = self.make_branch_and_tree('.')
> b = wt.branch
>
> ***** ignores._set_user_ignores(['./.bazaar']) *****
>
>
> There seem to be a number of them, and its not clear to me when they
> need to be set, or why.
The .bazaar/ignore file is now created if it doesn't exist. All of these
tests are creating a branch in the root of the test directory. Which
means that $HOME == $BRANCH_ROOT, and now a directory is showing up
there that they didn't expect.
>
> Theres no mention in HACKING of it, and the tests I've looked at pass
> when the line is removed - where is it needed? what is it for?
I'm surprised. I only added it to tests that were failing. But if you
know of some tests that can pass without it, feel free to change it.
>
> Could this be set by the set suite isolation logic perhaps rather than
> in each test?
>
> Martin and I have talked and perhaps what is needed is a clear 'working
> dir' and 'home dir' per test, rather than making 'home be cwd' each
> time.
>
> -Rob
>
I completely agree that HOME should not be WORKING dir. For one thing,
all of these tests that are trying to avoid './.bazaar' are now failing
on windows because the directory is './Bazaar/2.0'.
So it was an incomplete fix on my part, to handle the new
'.bazaar/ignore' file changes, and trying to do it without modifying the
tests in other ways.
Personally, I have taken to using:
tree = self.make_branch_and_tree('tree')
Rather than creating trees in the working directory.
Which is a little bit cleaner anyway, because you can then create new
trees without having them as sub-dirs of the first one. But it does make
tests marginally more difficult to write.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060822/9d28c119/attachment.pgp
More information about the bazaar
mailing list