/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 breezy/tests/test_branch.py

  • Committer: Jelmer Vernooij
  • Date: 2017-06-05 09:42:14 UTC
  • mto: This revision was merged to the branch mainline in revision 6666.
  • Revision ID: jelmer@jelmer.uk-20170605094214-iy8m1eay3skjasyf
Fix some more imports.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
    def test_default_format(self):
48
48
        # update this if you change the default branch format
49
49
        self.assertIsInstance(_mod_branch.format_registry.get_default(),
50
 
                _mod_branch.BzrBranchFormat7)
 
50
                _mod_bzrbranch.BzrBranchFormat7)
51
51
 
52
52
    def test_default_format_is_same_as_bzrdir_default(self):
53
53
        # XXX: it might be nice if there was only one place the default was
281
281
 
282
282
    def test_creation(self):
283
283
        format = bzrdir.BzrDirMetaFormat1()
284
 
        format.set_branch_format(_mod_branch.BzrBranchFormat6())
 
284
        format.set_branch_format(_mod_bzrbranch.BzrBranchFormat6())
285
285
        branch = self.make_branch('a', format=format)
286
286
        self.assertIsInstance(branch, self.get_class())
287
287
        branch = self.make_branch('b', format=self.get_format_name())
345
345
class TestBranch6(TestBranch67, tests.TestCaseWithTransport):
346
346
 
347
347
    def get_class(self):
348
 
        return _mod_branch.BzrBranch6
 
348
        return _mod_bzrbranch.BzrBranch6
349
349
 
350
350
    def get_format_name(self):
351
351
        return "dirstate-tags"
366
366
class TestBranch7(TestBranch67, tests.TestCaseWithTransport):
367
367
 
368
368
    def get_class(self):
369
 
        return _mod_branch.BzrBranch7
 
369
        return _mod_bzrbranch.BzrBranch7
370
370
 
371
371
    def get_format_name(self):
372
372
        return "1.9"
377
377
    def test_set_stacked_on_url_unstackable_repo(self):
378
378
        repo = self.make_repository('a', format='dirstate-tags')
379
379
        control = repo.bzrdir
380
 
        branch = _mod_branch.BzrBranchFormat7().initialize(control)
 
380
        branch = _mod_bzrbranch.BzrBranchFormat7().initialize(control)
381
381
        target = self.make_branch('b')
382
382
        self.assertRaises(errors.UnstackableRepositoryFormat,
383
383
            branch.set_stacked_on_url, target.base)
385
385
    def test_clone_stacked_on_unstackable_repo(self):
386
386
        repo = self.make_repository('a', format='dirstate-tags')
387
387
        control = repo.bzrdir
388
 
        branch = _mod_branch.BzrBranchFormat7().initialize(control)
 
388
        branch = _mod_bzrbranch.BzrBranchFormat7().initialize(control)
389
389
        # Calling clone should not raise UnstackableRepositoryFormat.
390
390
        cloned_bzrdir = control.clone('cloned')
391
391
 
418
418
    def make_branch(self, location, format=None):
419
419
        if format is None:
420
420
            format = controldir.format_registry.make_bzrdir('1.9')
421
 
            format.set_branch_format(_mod_branch.BzrBranchFormat8())
 
421
            format.set_branch_format(_mod_bzrbranch.BzrBranchFormat8())
422
422
        return tests.TestCaseWithTransport.make_branch(
423
423
            self, location, format=format)
424
424