~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_repository.py

Branch now uses BzrDir reasonably sanely.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
import bzrlib.bzrdir as bzrdir
28
28
from bzrlib.errors import (NotBranchError,
 
29
                           NoSuchFile,
29
30
                           UnknownFormatError,
30
31
                           UnsupportedFormatError,
31
32
                           )
38
39
 
39
40
class TestDefaultFormat(TestCase):
40
41
 
41
 
    def test_get_set_default_initializer(self):
 
42
    def test_get_set_default_format(self):
42
43
        old_format = repository.RepositoryFormat.get_default_format()
43
44
        # default is None - we cannot create a Repository independently yet
44
45
        self.assertEqual(old_format, None)
77
78
 
78
79
    def open(self, a_bzrdir):
79
80
        return "opened repository."
 
81
 
 
82
 
 
83
class TestFormat6(TestCaseWithTransport):
 
84
 
 
85
    def test_no_ancestry_weave(self):
 
86
        control = bzrdir.BzrDirFormat6().initialize(self.get_url())
 
87
        repo = repository.RepositoryFormat6().initialize(control)
 
88
        # We no longer need to create the ancestry.weave file
 
89
        # since it is *never* used.
 
90
        self.assertRaises(NoSuchFile,
 
91
                          control.transport.get,
 
92
                          'ancestry.weave')
 
93