[MERGE] Fix shared BzrDir.create_repository()
John Arbash Meinel
john at arbash-meinel.com
Wed Jul 5 22:09:23 BST 2006
Jelmer Vernooij wrote:
> On Wed, 2006-07-05 at 15:06 -0500, John Arbash Meinel wrote:
...
> Fixed as well, updated bundle attached.
>
> Cheers,
>
> Jelmer
...
v- All the tests here looked good
> === modified file bzrlib/tests/bzrdir_implementations/test_bzrdir.py
> --- bzrlib/tests/bzrdir_implementations/test_bzrdir.py
> +++ bzrlib/tests/bzrdir_implementations/test_bzrdir.py
...
> === modified file bzrlib/tests/test_bzrdir.py
> --- bzrlib/tests/test_bzrdir.py
> +++ bzrlib/tests/test_bzrdir.py
> @@ -62,7 +62,7 @@
> class SampleBzrDir(bzrdir.BzrDir):
> """A sample BzrDir implementation to allow testing static methods."""
>
> - def create_repository(self):
> + def create_repository(self, shared=False):
> """See BzrDir.create_repository."""
> return "A repository"
>
^- This is probably correct.
v- but I don't think you need these tests. Having the test in
'bzrdir_implementations' should mean it is run for every BzrDir format.
> @@ -163,6 +163,16 @@
> finally:
> bzrdir.BzrDirFormat.set_default_format(old_format)
>
> + def test_create_repository_shared(self):
> + old_format = bzrdir.BzrDirFormat.get_default_format()
> + repo = bzrdir.BzrDir.create_repository('.', shared=True)
> + self.assertTrue(repo.is_shared())
> +
> + def test_create_repository_nonshared(self):
> + old_format = bzrdir.BzrDirFormat.get_default_format()
> + repo = bzrdir.BzrDir.create_repository('.')
> + self.assertFalse(repo.is_shared())
> +
> def test_create_repository_under_shared(self):
> # an explicit create_repository always does so.
> # we trust the format is right from the 'create_repository test'
>
So, after removing the tests from bzrlib/tests/test_bzrdir.py, +1 from me.
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/20060705/ced53962/attachment.pgp
More information about the bazaar
mailing list