~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_bzrdir.py

  • Committer: John Arbash Meinel
  • Date: 2006-07-13 18:38:58 UTC
  • mfrom: (1863 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1869.
  • Revision ID: john@arbash-meinel.com-20060713183858-ebf4aa1f9ef8bb6e
[merge] bzr.dev 1863

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
 
 
171
    def test_create_repository_nonshared(self):
 
172
        old_format = bzrdir.BzrDirFormat.get_default_format()
 
173
        repo = bzrdir.BzrDir.create_repository('.')
 
174
        self.assertFalse(repo.is_shared())
 
175
 
166
176
    def test_create_repository_under_shared(self):
167
177
        # an explicit create_repository always does so.
168
178
        # we trust the format is right from the 'create_repository test'