[MERGE] Fix stacking tests applicability
John Arbash Meinel
john at arbash-meinel.com
Thu Dec 18 15:12:32 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Vincent Ladeuil wrote:
> Let's rephrase that hopefully more clearly.
>
> From the premise that it should be possible to define an
> unstackable branch format that pass the test suite, I modified
> loom to be explicit about that. (Since it didn't pass the test
> suite I thought it was a valid modification until loom support
> stacking).
>
> I had to modify some tests to reach that point.
>
> I also fixed a typo in test_osutils.TestChunksToLines.test_is_compiled.
>
> Vincent
>
> P.S.: I missed one failing test in my previous submission, bad
> vila, stop abusing 'selftest -s' :)
>
>
BB:resubmit
I'm pretty sure this needs to be rethought:
- - if isinstance(self.branch_format, branch.BzrBranchFormat4):
- - raise tests.TestNotApplicable('Not a metadir format.')
+ if not self.branch_format.supports_stacking():
+ raise tests.TestNotApplicable('%r does not support stacking'
+ % self.branch_format)
^- Basically, the test is *about* using a repository format which
supports stacking, and a *branch* format which does not. And ensuring
that we get a sane result when we are done.
You changed the test so that it only runs when we have a branch that
supports stacking... Which is not what we want.
Also:
raise TestNotApplicable()
# Avoid make_branch, which produces standalone branches.
bzrdir = self.make_bzrdir('repo/stack-on')
- - try:
- - b = bzrdir.create_branch()
- - except errors.UninitializableFormat:
- - raise TestNotApplicable()
+ b = bzrdir.create_branch()
^- Why did you do this one? Certainly there are formats that cannot be
initialized (our oldest branch format).
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAklKaGAACgkQJdeBCYSNAANAiQCdEke1HOcI9Sphhhzn8r7qUpN4
GaIAoLitZd4kKKISpd5K+9sC+pU4+JQT
=xgKd
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list