~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bad_files.py

Fix status to work with checkouts

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
from bzrlib.errors import BadFileKindError
23
23
import os
24
24
 
25
 
def verify_status(tester, branch, value):
26
 
    from bzrlib.status import show_status
 
25
def verify_status(tester, tree, value):
 
26
    from bzrlib.status import show_tree_status
27
27
    from cStringIO import StringIO
28
28
 
29
29
    tof = StringIO()
30
 
    show_status(branch, to_file=tof)
 
30
    show_tree_status(tree, to_file=tof)
31
31
    tof.seek(0)
32
32
    tester.assertEquals(tof.readlines(), value)
33
33
 
61
61
            return
62
62
 
63
63
        # status with nothing
64
 
        verify_status(self, b, [])
 
64
        verify_status(self, wt, [])
65
65
 
66
66
        os.mkfifo('a-fifo')
67
67
        self.build_tree(['six'])
68
68
 
69
 
        verify_status(self, b,
 
69
        verify_status(self, wt,
70
70
                          ['unknown:\n',
71
71
                           '  a-fifo\n',
72
72
                           '  six\n'
75
75
        # Make sure smart_add can handle having a bogus
76
76
        # file in the way
77
77
        smart_add_tree(wt, '.')
78
 
        verify_status(self, b,
 
78
        verify_status(self, wt,
79
79
                          ['added:\n',
80
80
                           '  six\n',
81
81
                           'unknown:\n',
83
83
                           ])
84
84
        wt.commit("Commit four", rev_id="a@u-0-3")
85
85
 
86
 
        verify_status(self, b,
 
86
        verify_status(self, wt,
87
87
                          ['unknown:\n',
88
88
                           '  a-fifo\n',
89
89
                           ])