~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/teststatus.py

  • Committer: Robert Collins
  • Date: 2005-08-24 08:34:10 UTC
  • mto: (974.1.50) (1185.1.10) (1092.3.1)
  • mto: This revision was merged to the branch mainline in revision 1139.
  • Revision ID: robertc@robertcollins.net-20050824083410-98aa4eeb52653394
import and use TestUtil to do regex based partial test runs

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
"""
22
22
 
23
23
 
24
 
from bzrlib.selftest import TestCaseInTempDir
 
24
from bzrlib.selftest import InTempDir
25
25
 
26
 
class BranchStatus(TestCaseInTempDir):
 
26
class BranchStatus(InTempDir):
27
27
    
28
28
    def test_branch_status(self): 
29
29
        """Basic 'bzr mkdir' operation"""
31
31
        from bzrlib.status import show_status
32
32
        from bzrlib.branch import Branch
33
33
        
34
 
        b = Branch.initialize('.')
 
34
        b = Branch('.', init=True)
35
35
 
36
36
        # status with nothing
37
37
        tof = StringIO()
40
40
 
41
41
        tof = StringIO()
42
42
        self.build_tree(['hello.c', 'bye.c'])
43
 
        b.add_pending_merge('pending@pending-0-0')
44
43
        show_status(b, to_file=tof)
45
44
        tof.seek(0)
46
45
        self.assertEquals(tof.readlines(),
47
46
                          ['unknown:\n',
48
47
                           '  bye.c\n',
49
48
                           '  hello.c\n',
50
 
                           'pending merges:\n',
51
 
                           '  pending@pending-0-0\n'
52
49
                           ])
53
50