~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: Jelmer Vernooij
  • Date: 2012-04-16 11:08:11 UTC
  • mfrom: (6521 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6522.
  • Revision ID: jelmer@samba.org-20120416110811-0y996ihqy9o2bb1t
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
from bzrlib import (
44
44
    branchbuilder,
45
45
    bzrdir,
 
46
    controldir,
46
47
    errors,
47
48
    hooks,
48
49
    lockdir,
609
610
        # Guard against regression into MemoryTransport leaking
610
611
        # files to disk instead of keeping them in memory.
611
612
        self.assertFalse(osutils.lexists('dir'))
612
 
        dir_format = bzrdir.format_registry.make_bzrdir('knit')
 
613
        dir_format = controldir.format_registry.make_bzrdir('knit')
613
614
        self.assertEqual(dir_format.repository_format.__class__,
614
615
                         the_branch.repository._format.__class__)
615
616
        self.assertEqual('Bazaar-NG Knit Repository Format 1',
678
679
        builder = self.make_branch_builder('dir')
679
680
        rev_id = builder.build_commit()
680
681
        self.assertPathExists('dir')
681
 
        a_dir = bzrdir.BzrDir.open('dir')
 
682
        a_dir = controldir.ControlDir.open('dir')
682
683
        self.assertRaises(errors.NoWorkingTree, a_dir.open_workingtree)
683
684
        a_branch = a_dir.open_branch()
684
685
        builder_branch = builder.get_branch()
1477
1478
        transport_server.start_server()
1478
1479
        self.addCleanup(transport_server.stop_server)
1479
1480
        t = transport.get_transport_from_url(transport_server.get_url())
1480
 
        bzrdir.BzrDir.create(t.base)
 
1481
        controldir.ControlDir.create(t.base)
1481
1482
        self.assertRaises(errors.BzrError,
1482
 
            bzrdir.BzrDir.open_from_transport, t)
 
1483
            controldir.ControlDir.open_from_transport, t)
1483
1484
        # But if we declare this as safe, we can open the bzrdir.
1484
1485
        self.permit_url(t.base)
1485
1486
        self._bzr_selftest_roots.append(t.base)
1486
 
        bzrdir.BzrDir.open_from_transport(t)
 
1487
        controldir.ControlDir.open_from_transport(t)
1487
1488
 
1488
1489
    def test_requireFeature_available(self):
1489
1490
        """self.requireFeature(available) is a no-op."""
1943
1944
    def test_make_branch_and_tree_with_format(self):
1944
1945
        # we should be able to supply a format to make_branch_and_tree
1945
1946
        self.make_branch_and_tree('a', format=bzrlib.bzrdir.BzrDirMetaFormat1())
1946
 
        self.assertIsInstance(bzrlib.bzrdir.BzrDir.open('a')._format,
 
1947
        self.assertIsInstance(bzrlib.controldir.ControlDir.open('a')._format,
1947
1948
                              bzrlib.bzrdir.BzrDirMetaFormat1)
1948
1949
 
1949
1950
    def test_make_branch_and_memory_tree(self):