~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
"""Black-box tests for running bzr outside of a working tree."""
20
20
 
21
21
import os
 
22
import tempfile
22
23
 
23
24
from bzrlib.tests import ChrootedTestCase
 
25
from bzrlib.osutils import getcwd
24
26
 
25
27
 
26
28
class TestOutsideWT(ChrootedTestCase):
27
29
    """Test that bzr gives proper errors outside of a working tree."""
28
30
 
29
31
    def test_cwd_log(self):
30
 
        os.chdir('/tmp')
31
 
        cwd = os.getcwdu()
 
32
        os.chdir(tempfile.mkdtemp())
 
33
        cwd = getcwd()
32
34
        out, err = self.run_bzr('log', retcode=3)
33
35
 
34
36
        self.assertEqual(u'bzr: ERROR: Not a branch: %s/\n' % (cwd,),