~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_whitebox.py

  • Committer: John Arbash Meinel
  • Date: 2005-12-01 19:43:42 UTC
  • mto: (1185.50.19 bzr-jam-integration)
  • mto: This revision was merged to the branch mainline in revision 1532.
  • Revision ID: john@arbash-meinel.com-20051201194342-da551dc3c2a1903a
Updated whitebox text for new PathNotChild exception

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
from bzrlib.osutils import relpath, pathjoin, abspath, realpath
8
8
 
9
9
 
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
 
120
120
 
121
121
            self.assertEqual(rp(abspath('foo')), 'foo')
122
122
 
123
 
            self.assertRaises(NotBranchError,
 
123
            self.assertRaises(PathNotChild,
124
124
                              rp, '../foo')
125
125
 
126
126
        finally: