~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_branch.py

  • Committer: Martin Pool
  • Date: 2007-08-14 05:05:49 UTC
  • mto: This revision was merged to the branch mainline in revision 2722.
  • Revision ID: mbp@sourcefrog.net-20070814050549-fgxov55ryq2terjt
(broken) start switching format to dirstate-tags

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
    BranchReferenceFormat,
40
40
    BzrBranch5,
41
41
    BzrBranchFormat5,
 
42
    BzrBranchFormat6,
42
43
    PullResult,
43
44
    )
44
45
from bzrlib.bzrdir import (BzrDirMetaFormat1, BzrDirMeta1, 
54
55
 
55
56
class TestDefaultFormat(TestCase):
56
57
 
 
58
    def test_default_format(self):
 
59
        # update this if you change the default branch format
 
60
        self.assertIsInstance(BranchFormat.get_default_format(),
 
61
                BzrBranchFormat6)
 
62
 
57
63
    def test_get_set_default_format(self):
 
64
        # set the format and then set it back again
58
65
        old_format = BranchFormat.get_default_format()
59
 
        # default is 5
60
 
        self.assertTrue(isinstance(old_format, BzrBranchFormat5))
61
66
        BranchFormat.set_default_format(SampleBranchFormat())
62
67
        try:
63
68
            # the default branch format is used by the meta dir format