~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_whitebox.py

[merge] john

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
from bzrlib.tests import TestCaseInTempDir, TestCase
5
5
from bzrlib.branch import ScratchBranch, Branch
6
 
from bzrlib.errors import NotBranchError
 
6
from bzrlib.errors import PathNotChild
7
7
 
8
8
 
9
9
class TestBranch(TestCaseInTempDir):
94
94
            # root = nothing
95
95
            self.assertEqual(rp(dtmp), '')
96
96
 
97
 
            self.assertRaises(NotBranchError,
 
97
            self.assertRaises(PathNotChild,
98
98
                              rp,
99
99
                              '/etc')
100
100
 
101
101
            # now some near-miss operations -- note that
102
102
            # os.path.commonprefix gets these wrong!
103
 
            self.assertRaises(NotBranchError,
 
103
            self.assertRaises(PathNotChild,
104
104
                              rp,
105
105
                              dtmp.rstrip('\\/') + '2')
106
106
 
107
 
            self.assertRaises(NotBranchError,
 
107
            self.assertRaises(PathNotChild,
108
108
                              rp,
109
109
                              dtmp.rstrip('\\/') + '2/foo')
110
110
 
121
121
 
122
122
            self.assertEqual(rp(os.path.abspath('foo')), 'foo')
123
123
 
124
 
            self.assertRaises(NotBranchError,
 
124
            self.assertRaises(PathNotChild,
125
125
                              rp, '../foo')
126
126
 
127
127
        finally: