~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-23 10:44:48 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-20050823104448-fb5d448e7a5a8ee3
relace runTest with test_foo in blackbox tests

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):
27
 
    
28
 
    def test_branch_status(self): 
 
26
class BranchStatus(InTempDir):
 
27
    def runTest(self): 
29
28
        """Basic 'bzr mkdir' operation"""
30
29
        from cStringIO import StringIO
31
30
        from bzrlib.status import show_status
32
31
        from bzrlib.branch import Branch
33
32
        
34
 
        b = Branch.initialize('.')
 
33
        b = Branch('.', init=True)
35
34
 
36
35
        # status with nothing
37
36
        tof = StringIO()
40
39
 
41
40
        tof = StringIO()
42
41
        self.build_tree(['hello.c', 'bye.c'])
43
 
        b.add_pending_merge('pending@pending-0-0')
44
42
        show_status(b, to_file=tof)
45
43
        tof.seek(0)
46
44
        self.assertEquals(tof.readlines(),
47
45
                          ['unknown:\n',
48
46
                           '  bye.c\n',
49
47
                           '  hello.c\n',
50
 
                           'pending merges:\n',
51
 
                           '  pending@pending-0-0\n'
52
48
                           ])
53
49