~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-09-25 18:42:17 UTC
  • mfrom: (2039.1.2 progress-cleanup)
  • Revision ID: pqm@pqm.ubuntu.com-20060925184217-fd144de117df49c3
cleanup progress properly when interrupted during fetch (#54000)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 Canonical Ltd
 
1
# Copyright (C) 2005 by Canonical Ltd
2
2
# -*- coding: utf-8 -*-
3
3
# vim: encoding=utf-8
4
4
#
20
20
 
21
21
import os
22
22
 
23
 
from bzrlib import osutils
24
 
 
25
23
from bzrlib.branch import Branch
26
 
from bzrlib.tests import TestCaseWithTransport
27
 
 
28
 
 
29
 
class TestMissing(TestCaseWithTransport):
 
24
from bzrlib.tests import TestCaseInTempDir
 
25
 
 
26
 
 
27
class TestMissing(TestCaseInTempDir):
30
28
 
31
29
    def test_missing(self):
32
30
        def bzr(*args, **kwargs):
120
118
        self.assertEqual("Branches are up to date.\n", 
121
119
                         bzr('missing', '../a'))
122
120
 
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)