~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Aaron Bentley
  • Date: 2006-03-18 23:40:51 UTC
  • mto: This revision was merged to the branch mainline in revision 1615.
  • Revision ID: aaron.bentley@utoronto.ca-20060318234051-415e5fcb51da82e4
Allow merge against self, make fetching self a noop

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 by Canonical Ltd
 
1
# Copyright (C) 2005 by Canonical Ltd
2
2
 
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
32
32
import bzrlib.branch
33
33
from bzrlib.builtins import merge
34
34
import bzrlib.bzrdir as bzrdir
35
 
import bzrlib.errors as errors
36
35
from bzrlib.osutils import pathjoin
37
36
from bzrlib.revisionspec import RevisionSpec
38
37
from bzrlib.status import show_tree_status
155
154
                           '  directory/hello.c\n'
156
155
                           ])
157
156
 
158
 
        self.assertRaises(errors.PathsDoNotExist,
159
 
                          show_tree_status,
160
 
                          wt, specific_files=['bye.c','test.c','absent.c'], 
161
 
                          to_file=tof)
 
157
        tof = StringIO()
 
158
        show_tree_status(wt, specific_files=['bye.c','test.c','absent.c'], 
 
159
                         to_file=tof)
 
160
        tof.seek(0)
 
161
        self.assertEquals(tof.readlines(),
 
162
                          ['unknown:\n',
 
163
                           '  bye.c\n'
 
164
                           ])
162
165
        
163
166
        tof = StringIO()
164
167
        show_tree_status(wt, specific_files=['directory'], to_file=tof)
175
178
                           '  dir2\n'
176
179
                           ])
177
180
 
178
 
    def test_status_nonexistent_file(self):
179
 
        # files that don't exist in either the basis tree or working tree
180
 
        # should give an error
181
 
        wt = self.make_branch_and_tree('.')
182
 
        out, err = self.run_bzr('status', 'does-not-exist', retcode=3)
183
 
        self.assertContainsRe(err, r'do not exist.*does-not-exist')
184
 
 
185
 
 
186
181
class CheckoutStatus(BranchStatus):
187
182
 
188
183
    def setUp(self):