/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_sign_my_commits.py

  • Committer: Jelmer Vernooij
  • Date: 2011-06-19 16:31:57 UTC
  • mto: This revision was merged to the branch mainline in revision 5987.
  • Revision ID: jelmer@samba.org-20110619163157-z2cbifxyagvtxuit
Fix handling of ghosts in sign_my_commits.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
"""Black-box tests for bzr sign-my-commits."""
19
19
 
20
 
import os
21
 
 
22
20
from bzrlib import (
23
21
    gpg,
24
22
    tests,
25
23
    )
26
 
from bzrlib.testament import Testament
27
 
from bzrlib.workingtree import WorkingTree
28
24
 
29
25
 
30
26
class SignMyCommits(tests.TestCaseWithTransport):
45
41
        wt.commit("base C", allow_pointless=True, rev_id='C')
46
42
        wt.commit("base D", allow_pointless=True, rev_id='D',
47
43
                committer='Alternate <alt@foo.com>')
48
 
 
 
44
        wt.add_parent_tree_id("aghost")
 
45
        wt.commit("base E", allow_pointless=True, rev_id='E')
49
46
        return wt
50
47
 
51
48
    def assertUnsigned(self, repo, revision_id):
110
107
        out = self.run_bzr('sign-my-commits --dry-run')[0]
111
108
 
112
109
        outlines = out.splitlines()
113
 
        self.assertEquals(4, len(outlines))
114
 
        self.assertEquals('Signed 3 revisions', outlines[-1])
 
110
        self.assertEquals(5, len(outlines))
 
111
        self.assertEquals('Signed 4 revisions', outlines[-1])
115
112
        self.assertUnsigned(repo, 'A')
116
113
        self.assertUnsigned(repo, 'B')
117
114
        self.assertUnsigned(repo, 'C')
118
115
        self.assertUnsigned(repo, 'D')
 
116
        self.assertUnsigned(repo, 'E')