~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bzrdir.py

  • Committer: Jelmer Vernooij
  • Date: 2006-07-05 19:56:19 UTC
  • mto: This revision was merged to the branch mainline in revision 1849.
  • Revision ID: jelmer@samba.org-20060705195619-4c91058b3d8197e2
Fix handling of `shared' parameter in BzrDir.create_repository().

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
class SampleBzrDir(bzrdir.BzrDir):
63
63
    """A sample BzrDir implementation to allow testing static methods."""
64
64
 
65
 
    def create_repository(self):
 
65
    def create_repository(self, shared=False):
66
66
        """See BzrDir.create_repository."""
67
67
        return "A repository"
68
68
 
163
163
        finally:
164
164
            bzrdir.BzrDirFormat.set_default_format(old_format)
165
165
 
 
166
    def test_create_repository_shared(self):
 
167
        old_format = bzrdir.BzrDirFormat.get_default_format()
 
168
        repo = bzrdir.BzrDir.create_repository('.', shared=True)
 
169
        self.assertTrue(repo.is_shared())
 
170
 
166
171
    def test_create_repository_under_shared(self):
167
172
        # an explicit create_repository always does so.
168
173
        # we trust the format is right from the 'create_repository test'