~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Aaron Bentley
  • Date: 2007-01-26 04:00:12 UTC
  • mfrom: (2245 +trunk)
  • mto: (2255.6.1 dirstate)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: aaron.bentley@utoronto.ca-20070126040012-j80k7qhvj80dyp9j
merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
import os
22
22
 
 
23
from bzrlib import osutils
 
24
 
23
25
from bzrlib.branch import Branch
24
 
from bzrlib.tests import TestCaseInTempDir
25
 
 
26
 
 
27
 
class TestMissing(TestCaseInTempDir):
 
26
from bzrlib.tests import TestCaseWithTransport
 
27
 
 
28
 
 
29
class TestMissing(TestCaseWithTransport):
28
30
 
29
31
    def test_missing(self):
30
32
        def bzr(*args, **kwargs):
118
120
        self.assertEqual("Branches are up to date.\n", 
119
121
                         bzr('missing', '../a'))
120
122
 
 
123
    def test_missing_check_last_location(self):
 
124
        # check that last location shown as filepath not file URL
 
125
 
 
126
        # create a source branch
 
127
        os.mkdir('a')
 
128
        os.chdir('a')
 
129
        wt = self.make_branch_and_tree('.')
 
130
        b = wt.branch
 
131
        self.build_tree(['foo'])
 
132
        wt.add('foo')
 
133
        wt.commit('initial')
 
134
 
 
135
        location = osutils.getcwd() + '/'
 
136
 
 
137
        # clone
 
138
        b.bzrdir.sprout('../b')
 
139
 
 
140
        # check last location
 
141
        lines, err = self.run_bzr('missing', working_dir='../b')
 
142
        self.assertEquals('Using last location: %s\n'
 
143
                          'Branches are up to date.\n' % location,
 
144
                          lines)
 
145
        self.assertEquals('', err)