~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: Patch Queue Manager
  • Date: 2012-02-22 13:39:51 UTC
  • mfrom: (6470.1.1 less-inventory-use-2)
  • Revision ID: pqm@pqm.ubuntu.com-20120222133951-cqvnnx710wox7905
(jelmer) Use inventories directly in fewer places. (Jelmer Vernooij)

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