~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bzrdir.py

  • Committer: Robert Collins
  • Date: 2006-02-13 08:15:16 UTC
  • mto: (1534.5.2 bzr-dir)
  • mto: This revision was merged to the branch mainline in revision 1554.
  • Revision ID: robertc@robertcollins.net-20060213081516-3d13375f0de0ccb6
find_repository sufficiently robust.

Show diffs side-by-side

added added

removed removed

Lines of Context:
207
207
        branch, relpath = bzrdir.BzrDir.open_containing(self.get_readonly_url('g/p/q'))
208
208
        self.assertEqual('g/p/q', relpath)
209
209
 
 
210
    def test_open_containing_transport(self):
 
211
        self.assertRaises(NotBranchError, bzrdir.BzrDir.open_containing_transport,
 
212
                          get_transport(self.get_readonly_url('')))
 
213
        self.assertRaises(NotBranchError, bzrdir.BzrDir.open_containing_transport,
 
214
                          get_transport(self.get_readonly_url('g/p/q')))
 
215
        control = bzrdir.BzrDir.create(self.get_url())
 
216
        branch, relpath = bzrdir.BzrDir.open_containing_transport(
 
217
            get_transport(self.get_readonly_url('')))
 
218
        self.assertEqual('', relpath)
 
219
        branch, relpath = bzrdir.BzrDir.open_containing_transport(
 
220
            get_transport(self.get_readonly_url('g/p/q')))
 
221
        self.assertEqual('g/p/q', relpath)
 
222
 
210
223
 
211
224
class TestMeta1DirFormat(TestCaseWithTransport):
212
225
    """Tests specific to the meta1 dir format."""