~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin Pool
  • Date: 2006-02-01 12:24:35 UTC
  • mfrom: (1534.4.32 branch-formats)
  • mto: This revision was merged to the branch mainline in revision 1553.
  • Revision ID: mbp@sourcefrog.net-20060201122435-53f3efb1b5749fe1
[merge] branch-formats branch, and reconcile changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
import os
22
22
 
23
 
from bzrlib.tests import TestCaseInTempDir
24
 
 
25
 
 
26
 
class TestOutsideWT(TestCaseInTempDir):
 
23
from bzrlib.tests import ChrootedTestCase
 
24
 
 
25
 
 
26
class TestOutsideWT(ChrootedTestCase):
27
27
    """Test that bzr gives proper errors outside of a working tree."""
28
28
 
29
 
    def test_log(self):
 
29
    def test_cwd_log(self):
30
30
        os.chdir('/tmp')
31
31
        cwd = os.getcwdu()
32
32
        out, err = self.run_bzr('log', retcode=3)
34
34
        self.assertEqual(u'bzr: ERROR: Not a branch: %s\n' % (cwd,),
35
35
                         err)
36
36
 
37
 
    def test_http_log(self):
38
 
        print "FIXME: Use a real http server with no branch initialized in test_outside_wt.test_http_log"
39
 
        # This breaks when there is no wildcard DNS resolver: the error is (correctly) an HTTP error not
40
 
        # NotBranchError.
41
 
        return
 
37
    def test_url_log(self):
 
38
        url = self.get_readonly_url() + 'subdir/'
42
39
        out, err = self.run_bzr('log', 
43
 
                                'http://aosehuasotehu/invalid/', retcode=3)
44
 
 
45
 
        self.assertEqual(u'bzr: ERROR: Not a branch:'
46
 
                         u' http://aosehuasotehu/invalid/\n', err)
47
 
 
48
 
    def test_abs_log(self):
49
 
        out, err = self.run_bzr('log', '/tmp/path/not/branch', retcode=3)
50
 
 
51
 
        self.assertEqual(u'bzr: ERROR: Not a branch:'
52
 
                         u' /tmp/path/not/branch\n', err)
53
 
 
54
 
 
 
40
                                url, retcode=3)
 
41
        self.assertEqual(u'bzr: ERROR: Not a branch:'
 
42
                         u' %s\n' % url, err)