~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_annotate.py

Move working tree initialisation out from  Branch.initialize, deprecated Branch.initialize to Branch.create.

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.tests import TestCaseWithTransport
38
38
from bzrlib.annotate import annotate_file
39
39
 
40
40
 
41
 
class TestAnnotate(TestCaseInTempDir):
 
41
class TestAnnotate(TestCaseWithTransport):
 
42
 
42
43
    def setUp(self):
43
44
        super(TestAnnotate, self).setUp()
44
 
        b = Branch.initialize(u'.')
 
45
        wt = self.make_branch_and_tree('.')
 
46
        b = wt.branch
45
47
        self.build_tree_contents([('hello.txt', 'my helicopter\n'),
46
48
                                  ('nomail.txt', 'nomail\n')])
47
 
        b.working_tree().add(['hello.txt'])
48
 
        b.working_tree().commit('add hello', 
 
49
        wt.add(['hello.txt'])
 
50
        wt.commit('add hello', 
49
51
                                committer='test@user')
50
 
        b.working_tree().add(['nomail.txt'])
51
 
        b.working_tree().commit('add nomail', committer='no mail')
 
52
        wt.add(['nomail.txt'])
 
53
        wt.commit('add nomail', committer='no mail')
52
54
 
53
55
    def test_help_annotate(self):
54
56
        """Annotate command exists"""