/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/blackbox/test_outside_wt.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 19:09:26 UTC
  • mfrom: (6622.1.36 breezy)
  • Revision ID: jelmer@jelmer.uk-20170521190926-5vtz8xaf0e9ylrpc
Merge rename to breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
17
 
18
18
 
19
 
"""Black-box tests for running bzr outside of a working tree."""
 
19
"""Black-box tests for running brz outside of a working tree."""
20
20
 
21
21
import os
22
22
 
23
 
from bzrlib import (
 
23
from breezy import (
24
24
    osutils,
25
25
    tests,
26
26
    transport,
29
29
 
30
30
 
31
31
class TestOutsideWT(tests.ChrootedTestCase):
32
 
    """Test that bzr gives proper errors outside of a working tree."""
 
32
    """Test that brz gives proper errors outside of a working tree."""
33
33
 
34
34
    def test_cwd_log(self):
35
35
        # Watch out for tricky test dir (on OSX /tmp -> /private/tmp)
38
38
        self.permit_url('file:///')
39
39
        self.addCleanup(osutils.rmtree, tmp_dir)
40
40
        out, err = self.run_bzr('log', retcode=3, working_dir=tmp_dir)
41
 
        self.assertEqual(u'bzr: ERROR: Not a branch: "%s/".\n'
 
41
        self.assertEqual(u'brz: ERROR: Not a branch: "%s/".\n'
42
42
                         % (tmp_dir,),
43
43
                         err)
44
44
 
45
45
    def test_url_log(self):
46
46
        url = self.get_readonly_url() + 'subdir/'
47
47
        out, err = self.run_bzr(['log', url], retcode=3)
48
 
        self.assertEqual(u'bzr: ERROR: Not a branch:'
 
48
        self.assertEqual(u'brz: ERROR: Not a branch:'
49
49
                         u' "%s".\n' % url, err)
50
50
 
51
51
    def test_diff_outside_tree(self):
53
53
        tree.commit('nothing')
54
54
        tree.commit('nothing')
55
55
        # A directory we can run commands from which we hope is not contained
56
 
        # in a bzr tree (though if there is one at or above $TEMPDIR, this is
 
56
        # in a brz tree (though if there is one at or above $TEMPDIR, this is
57
57
        # false and may cause test failures).
58
58
        # Watch out for tricky test dir (on OSX /tmp -> /private/tmp)
59
59
        tmp_dir = osutils.realpath(osutils.mkdtemp())
60
60
        self.addCleanup(osutils.rmtree, tmp_dir)
61
61
        # We expect a read-to-root attempt to occur.
62
62
        self.permit_url('file:///')
63
 
        expected_error = u'bzr: ERROR: Not a branch: "%s/branch2/".\n' % tmp_dir
 
63
        expected_error = u'brz: ERROR: Not a branch: "%s/branch2/".\n' % tmp_dir
64
64
        # -r X..Y
65
65
        out, err = self.run_bzr('diff -r revno:2:branch2..revno:1', retcode=3,
66
66
            working_dir=tmp_dir)
79
79
        # no -r at all.
80
80
        out, err = self.run_bzr('diff', retcode=3, working_dir=tmp_dir)
81
81
        self.assertEqual('', out)
82
 
        self.assertEqual(u'bzr: ERROR: Not a branch: "%s/".\n' % tmp_dir, err)
 
82
        self.assertEqual(u'brz: ERROR: Not a branch: "%s/".\n' % tmp_dir, err)