[MERGE] Various test fixes and tweaks for packs.

Jelmer Vernooij jelmer at samba.org
Mon Sep 17 15:40:47 BST 2007


Am Freitag, den 14.09.2007, 12:27 +1000 schrieb Robert Collins:
> As the topic says, this is just a bunch of test tweaks I did in the
> packs branch.

> @@ -272,7 +276,11 @@
>          wt = self.make_branch_and_tree('source')
>          wt.commit('A', allow_pointless=True, rev_id='A')
>          repo = wt.branch.repository
> -        repo.sign_revision('A', gpg.LoopbackGPGStrategy(None))
> +        repo.lock_write()
> +        repo.start_write_group()
> +        repo.sign_revision('A', bzrlib.gpg.LoopbackGPGStrategy(None))
                                   ^^^^ why the change to bzrlib.gpg ?
That seems inconsistent with what the rest of that file uses. 

> === modified file
> 'bzrlib/tests/repository_implementations/test_repository.py'
> ---
> bzrlib/tests/repository_implementations/test_repository.py  2007-08-21
> 03:40:50 +0000
> +++
> bzrlib/tests/repository_implementations/test_repository.py  2007-09-14
> 02:19:41 +0000
> @@ -234,13 +234,6 @@
>          new_signature = wt.branch.repository.get_signature_text('A')
>          self.assertEqual(old_signature, new_signature)
>  
> -    def test_exposed_versioned_files_are_marked_dirty(self):
> -        repo = self.make_repository('.')
> -        repo.lock_write()
> -        inv = repo.get_inventory_weave()
> -        repo.unlock()
> -        self.assertRaises(errors.OutSideTransaction, inv.add_lines,
> 'foo', [], [])
> -
^^^ I'd rather see this test not be removed because it is still valid
for non-pack formats. Perhaps change the assertRaises to check for
(errors.OutSideTransaction, errors.NotWriteLocked) ?

BB:tweak

Cheers,

Jelmer
-- 
Jelmer Vernooij <jelmer at samba.org> - http://samba.org/~jelmer/
Jabber: jelmer at jabber.fsfe.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070917/2f81b0ae/attachment.pgp 


More information about the bazaar mailing list