~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testannotate.py

  • Committer: Robert Collins
  • Date: 2005-10-17 11:56:54 UTC
  • mfrom: (1185.16.59)
  • Revision ID: robertc@robertcollins.net-20051017115654-662239e1587524a8
mergeĀ fromĀ martin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
from bzrlib.clone import copy_branch
35
35
from bzrlib.errors import BzrCommandError
36
36
from bzrlib.osutils import has_symlinks
37
 
from bzrlib.tests import TestCaseInTempDir, BzrTestBase
 
37
from bzrlib.selftest import TestCaseInTempDir, BzrTestBase
38
38
from bzrlib.annotate import annotate_file
39
39
 
40
40
 
41
41
class TestAnnotate(TestCaseInTempDir):
42
42
    def setUp(self):
43
43
        super(TestAnnotate, self).setUp()
44
 
        b = Branch.initialize(u'.')
45
 
        self.build_tree_contents([('hello.txt', 'my helicopter\n'),
46
 
                                  ('nomail.txt', 'nomail\n')])
47
 
        b.working_tree().add(['hello.txt'])
48
 
        b.working_tree().commit('add hello', 
49
 
                                committer='test@user')
50
 
        b.working_tree().add(['nomail.txt'])
51
 
        b.working_tree().commit('add nomail', committer='no mail')
 
44
        b = Branch.initialize('.')
 
45
        self.build_tree_contents([('hello.txt', 'my helicopter\n')])
 
46
        b.add(['hello.txt'])
 
47
        b.commit('add hello', 
 
48
                 committer='test@user')
52
49
 
53
50
    def test_help_annotate(self):
54
51
        """Annotate command exists"""
60
57
        self.assertEqualDiff(out, '''\
61
58
    1 test@us | my helicopter
62
59
''')
63
 
 
64
 
    def test_no_mail(self):
65
 
        out, err = self.run_bzr_captured(['annotate', 'nomail.txt'])
66
 
        self.assertEquals(err, '')
67
 
        self.assertEqualDiff(out, '''\
68
 
    2 no mail | nomail
69
 
''')