[MERGE] Fix stacking tests applicability
John Arbash Meinel
john at arbash-meinel.com
Fri Dec 19 19:07:32 GMT 2008
John Arbash Meinel has voted comment.
Status is now: Semi-approved
Comment:
(sorry, I hit enter by accident)
If I understand correctly, the basic change you made is to switch:
target = source.bzrdir.sprout('target').open_branch()
so that if it raises UnstackableBranchFormat it translates that error
into "TestNotApplicable". And you did this for several different tests.
Is that correct?
IMO, that is not the correct fix. Consider the causes:
1) source.bzrdir.sprout('target')
This doesn't seem like something that should *ever raise
UnstackableBranchFormat.
If there is a "default_stack_on" policy, but the branch format doesn't
support
stacking, it should just not stack. And if it does support stacking,
then
everything should just work.
Note that the individual tests can then later say stuff like
"get_stacked_on_url()" should either raise an exception, or give this
specific
result. But, IMO, sprout() should not be failing.
2) source.bzrdir.sprout('target').open_branch()
This should *definitely* never raise UnstackableBranchFormat. Once you
have
created the branch from sprout() you *better* be able to open it. Or we
have
created something explicitly broken as a result of sprout(). And I would
*want*
a failing test letting me know that "sprout()" is broken for this
format.
For details, see:
http://bundlebuggy.aaronbentley.com/project/bzr/request/%3Cm2vdtgb9pa.fsf%40free.fr%3E
Project: Bazaar
More information about the bazaar
mailing list