~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Got the bzrdir api straightened out, plenty of refactoring to use it pending, but the api is up and running.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
from bzrlib.builtins import merge
34
34
from bzrlib.revisionspec import RevisionSpec
35
35
from bzrlib.status import show_status
36
 
from bzrlib.tests import TestCaseInTempDir
 
36
from bzrlib.tests import TestCaseWithTransport
37
37
from bzrlib.workingtree import WorkingTree
38
38
 
39
39
 
40
 
class BranchStatus(TestCaseInTempDir):
 
40
class BranchStatus(TestCaseWithTransport):
41
41
    
42
42
    def test_branch_status(self): 
43
43
        """Test basic branch status"""
44
 
        wt = WorkingTree.create_standalone('.')
 
44
        wt = self.make_branch_and_tree('.')
45
45
        b = wt.branch
46
46
 
47
47
        # status with nothing
64
64
 
65
65
    def test_branch_status_revisions(self):
66
66
        """Tests branch status with revisions"""
67
 
        wt = WorkingTree.create_standalone('.')
 
67
        wt = self.make_branch_and_tree('.')
68
68
        b = wt.branch
69
69
 
70
70
        tof = StringIO()
111
111
    def test_pending(self):
112
112
        """Pending merges display works, including Unicode"""
113
113
        mkdir("./branch")
114
 
        wt = WorkingTree.create_standalone('branch')
 
114
        wt = self.make_branch_and_tree('branch')
115
115
        b = wt.branch
116
116
        wt.commit("Empty commit 1")
117
 
        b_2 = b.clone('./copy')
118
 
        wt2 = WorkingTree('copy', b_2)
 
117
        b_2_dir = b.bzrdir.sprout('./copy')
 
118
        b_2 = b_2_dir.open_branch()
 
119
        wt2 = b_2_dir.open_workingtree()
119
120
        wt.commit(u"\N{TIBETAN DIGIT TWO} Empty commit 2")
120
121
        merge(["./branch", -1], [None, None], this_dir = './copy')
121
122
        message = self.status_string(b_2)
133
134
 
134
135
    def test_branch_status_specific_files(self): 
135
136
        """Tests branch status with given specific files"""
136
 
        wt = WorkingTree.create_standalone('.')
 
137
        wt = self.make_branch_and_tree('.')
137
138
        b = wt.branch
138
139
 
139
140
        self.build_tree(['directory/','directory/hello.c', 'bye.c','test.c','dir2/'])