~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bzrdir.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-03-29 04:35:40 UTC
  • mfrom: (2381.1.4 hpss-test-correctness)
  • Revision ID: pqm@pqm.ubuntu.com-20070329043540-952aff23533c1c26
(robertc) Various test suite changes and cleanups in preparation for the next hpss branch. (Robert Collins, Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
335
335
 
336
336
    def test_create_branch_convenience_root(self):
337
337
        """Creating a branch at the root of a fs should work."""
338
 
        self.transport_server = MemoryServer
 
338
        self.vfs_transport_factory = MemoryServer
339
339
        # outside a repo the default convenience output is a repo+branch_tree
340
340
        format = bzrdir.format_registry.make_bzrdir('knit')
341
341
        branch = bzrdir.BzrDir.create_branch_convenience(self.get_url(), 
413
413
 
414
414
    def setUp(self):
415
415
        super(ChrootedTests, self).setUp()
416
 
        if not self.transport_server == MemoryServer:
 
416
        if not self.vfs_transport_factory == MemoryServer:
417
417
            self.transport_readonly_server = HttpServer
418
418
 
419
419
    def test_open_containing(self):
454
454
                         local_branch_path(branch))
455
455
        self.assertIs(tree.bzrdir, branch.bzrdir)
456
456
        self.assertEqual('foo', relpath)
 
457
        # opening from non-local should not return the tree
 
458
        tree, branch, relpath = bzrdir.BzrDir.open_containing_tree_or_branch(
 
459
            self.get_readonly_url('topdir/foo'))
 
460
        self.assertEqual(None, tree)
 
461
        self.assertEqual('foo', relpath)
 
462
        # without a tree:
457
463
        self.make_branch('topdir/foo')
458
464
        tree, branch, relpath = bzrdir.BzrDir.open_containing_tree_or_branch(
459
465
            'topdir/foo')
716
722
 
717
723
    def setUp(self):
718
724
        super(NonLocalTests, self).setUp()
719
 
        self.transport_server = MemoryServer
 
725
        self.vfs_transport_factory = MemoryServer
720
726
    
721
727
    def test_create_branch_convenience(self):
722
728
        # outside a repo the default convenience output is a repo+branch_tree
758
764
        checkout_format = my_bzrdir.checkout_metadir()
759
765
        self.assertIsInstance(checkout_format.workingtree_format,
760
766
                              workingtree.WorkingTreeFormat3)
761
 
 
762
 
 
763
 
class TestRemoteSFTP(test_sftp_transport.TestCaseWithSFTPServer):
764
 
 
765
 
    def test_open_containing_tree_or_branch(self):
766
 
        tree = self.make_branch_and_tree('tree')
767
 
        bzrdir.BzrDir.open_containing_tree_or_branch(self.get_url('tree'))