~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

Merge test_repository fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
383
383
        wt4_format = workingtree.WorkingTreeFormat4()
384
384
        wt5_format = workingtree.WorkingTreeFormat5()
385
385
        expected_scenarios = [
386
 
            ('WorkingTreeFormat2',
 
386
            ('WorkingTreeFormat4',
387
387
             {'bzrdir_format': formats[0]._matchingbzrdir,
388
388
              'transport_readonly_server': 'b',
389
389
              'transport_server': 'a',
555
555
    def test_make_branch_and_memory_tree_with_format(self):
556
556
        """make_branch_and_memory_tree should accept a format option."""
557
557
        format = bzrdir.BzrDirMetaFormat1()
558
 
        format.repository_format = repository.RepositoryFormat.get_default_format()
 
558
        format.repository_format = repository.format_registry.get_default()
559
559
        tree = self.make_branch_and_memory_tree('dir', format=format)
560
560
        # Guard against regression into MemoryTransport leaking
561
561
        # files to disk instead of keeping them in memory.
575
575
        # Use a repo layout that doesn't conform to a 'named' layout, to ensure
576
576
        # that the format objects are used.
577
577
        format = bzrdir.BzrDirMetaFormat1()
578
 
        repo_format = repository.RepositoryFormat.get_default_format()
 
578
        repo_format = repository.format_registry.get_default()
579
579
        format.repository_format = repo_format
580
580
        builder = self.make_branch_builder('dir', format=format)
581
581
        the_branch = builder.get_branch()
1975
1975
    def test_make_branch_and_tree_with_format(self):
1976
1976
        # we should be able to supply a format to make_branch_and_tree
1977
1977
        self.make_branch_and_tree('a', format=bzrlib.bzrdir.BzrDirMetaFormat1())
1978
 
        from bzrlib.plugins.weave_fmt.bzrdir import BzrDirFormat6
1979
 
        self.make_branch_and_tree('b', format=BzrDirFormat6())
1980
1978
        self.assertIsInstance(bzrlib.bzrdir.BzrDir.open('a')._format,
1981
1979
                              bzrlib.bzrdir.BzrDirMetaFormat1)
1982
 
        self.assertIsInstance(bzrlib.bzrdir.BzrDir.open('b')._format,
1983
 
                              BzrDirFormat6)
1984
1980
 
1985
1981
    def test_make_branch_and_memory_tree(self):
1986
1982
        # we should be able to get a new branch and a mutable tree from