/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_controldir/test_controldir.py

(jelmer) Remove more unused imports and more use of specific formats in
 tests. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    )
34
34
import bzrlib.revision
35
35
from bzrlib.tests import (
36
 
                          ChrootedTestCase,
37
 
                          TestNotApplicable,
38
 
                          TestSkipped,
39
 
                          )
 
36
    ChrootedTestCase,
 
37
    TestNotApplicable,
 
38
    TestSkipped,
 
39
    )
40
40
from bzrlib.tests.per_controldir import TestCaseWithControlDir
41
41
from bzrlib.transport.local import LocalTransport
42
42
from bzrlib.ui import (
43
43
    CannedInputUIFactory,
44
44
    )
45
 
from bzrlib.remote import RemoteBzrDir, RemoteRepository
 
45
from bzrlib.remote import (
 
46
    RemoteBzrDir,
 
47
    RemoteRepository,
 
48
    )
46
49
from bzrlib.repofmt import weaverepo
47
50
 
48
51
 
754
757
        tree.commit('revision 1', rev_id='1')
755
758
        tree.commit('revision 2', rev_id='2', allow_pointless=True)
756
759
        dir = tree.bzrdir
757
 
        if isinstance(dir, (bzrdir.BzrDirPreSplitOut,)):
758
 
            self.assertRaises(errors.MustHaveWorkingTree, dir.sprout,
759
 
                              self.get_url('target'),
760
 
                              create_tree_if_local=False)
761
 
            return
762
 
        target = dir.sprout(self.get_url('target'), create_tree_if_local=False)
 
760
        try:
 
761
            target = dir.sprout(self.get_url('target'),
 
762
                create_tree_if_local=False)
 
763
        except errors.MustHaveWorkingTree:
 
764
            raise TestNotApplicable("control dir format requires working tree")
763
765
        self.failIfExists('target/foo')
764
766
        self.assertEqual(tree.branch.last_revision(),
765
767
                         target.open_branch().last_revision())
1205
1207
        self.assertTrue(isinstance(dir.get_repository_transport(None),
1206
1208
                                   transport.Transport))
1207
1209
        # with a given format, either the bzr dir supports identifiable
1208
 
        # repositories, or it supports anonymous  repository formats, but not both.
 
1210
        # repositories, or it supports anonymous repository formats, but not both.
1209
1211
        anonymous_format = weaverepo.RepositoryFormat6()
1210
1212
        identifiable_format = weaverepo.RepositoryFormat7()
1211
1213
        try: