~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_selftest.py

  • Committer: Martin Pool
  • Date: 2007-02-06 06:27:24 UTC
  • mto: This revision was merged to the branch mainline in revision 2283.
  • Revision ID: mbp@sourcefrog.net-20070206062724-a5uo1u27jxsal2t0
Moved old weave-based repository formats into bzrlib.repofmt.weaverepo.

Change help for --format to just say 'see help formats'

RepositoryFormat.register_metadir gains an optional parameter for the
module name containing the repository format, and lazily loads from there.

Disable test_interrepository_get_returns_correct_optimiser, because it
seems too brittle.

Remove InterWeaveRepo, these should now just be upgraded.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 Canonical Ltd
 
1
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
27
27
import bzrlib
28
28
from bzrlib import (
29
29
    bzrdir,
 
30
    errors,
30
31
    memorytree,
31
32
    osutils,
32
33
    repository,
 
34
    symbol_versioning,
33
35
    )
34
36
from bzrlib.progress import _BaseProgressBar
 
37
from bzrlib.repofmt import weaverepo
 
38
from bzrlib.symbol_versioning import zero_ten, zero_eleven
35
39
from bzrlib.tests import (
36
40
                          ChrootedTestCase,
37
41
                          TestCase,
44
48
                          )
45
49
from bzrlib.tests.test_sftp_transport import TestCaseWithSFTPServer
46
50
from bzrlib.tests.TestUtil import _load_module_by_name
47
 
import bzrlib.errors as errors
48
 
from bzrlib import symbol_versioning
49
 
from bzrlib.symbol_versioning import zero_ten, zero_eleven
50
51
from bzrlib.trace import note
51
52
from bzrlib.transport.memory import MemoryServer, MemoryTransport
52
53
from bzrlib.version import _get_bzr_source_tree
475
476
    def test_make_branch_and_memory_tree_with_format(self):
476
477
        """make_branch_and_memory_tree should accept a format option."""
477
478
        format = bzrdir.BzrDirMetaFormat1()
478
 
        format.repository_format = repository.RepositoryFormat7()
 
479
        format.repository_format = weaverepo.RepositoryFormat7()
479
480
        tree = self.make_branch_and_memory_tree('dir', format=format)
480
481
        # Guard against regression into MemoryTransport leaking
481
482
        # files to disk instead of keeping them in memory.