/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/tests/per_bzrdir/test_bzrdir.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
import errno
20
20
from stat import S_ISDIR
21
21
 
22
 
import bzrlib.branch
23
 
from bzrlib import (
 
22
import breezy.branch
 
23
from breezy import (
24
24
    bzrdir,
25
25
    controldir,
26
26
    errors,
29
29
    transport,
30
30
    workingtree,
31
31
    )
32
 
from bzrlib.remote import RemoteBzrDirFormat
33
 
from bzrlib.tests import (
 
32
from breezy.remote import RemoteBzrDirFormat
 
33
from breezy.tests import (
34
34
    TestNotApplicable,
35
35
    TestSkipped,
36
36
    )
37
 
from bzrlib.tests.per_bzrdir import TestCaseWithBzrDir
38
 
from bzrlib.transport.local import (
 
37
from breezy.tests.per_bzrdir import TestCaseWithBzrDir
 
38
from breezy.transport.local import (
39
39
    LocalTransport,
40
40
    )
41
41
 
42
42
 
43
 
class AnonymousTestBranchFormat(bzrlib.branch.BranchFormat):
 
43
class AnonymousTestBranchFormat(breezy.branch.BranchFormat):
44
44
    """An anonymous branch format (does not have a format string)"""
45
45
 
46
46
    def get_format_string(self):
47
47
        raise NotImplementedError(self.get_format_string)
48
48
 
49
49
 
50
 
class IdentifiableTestBranchFormat(bzrlib.branch.BranchFormat):
 
50
class IdentifiableTestBranchFormat(breezy.branch.BranchFormat):
51
51
    """An identifable branch format (has a format string)"""
52
52
 
53
53
    def get_format_string(self):
464
464
            self.addCleanup(inventory_f.close)
465
465
            self.assertContainsRe(inventory_f.read(),
466
466
                                  '<inventory format="5">\n</inventory>\n')
467
 
        except IOError, e:
 
467
        except IOError as e:
468
468
            if e.errno != errno.ENOENT:
469
469
                raise
470
470
 
689
689
            raise TestNotApplicable('Format does not support colocation')
690
690
        target_branch = repo.bzrdir.create_branch(name='foo')
691
691
        repo.bzrdir.set_branch_reference(target_branch)
692
 
        self.assertEqual(set(["", 'foo']),
 
692
        self.assertEqual({"", 'foo'},
693
693
                         set(repo.bzrdir.get_branches().keys()))