~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_repository.py

  • Committer: Jelmer Vernooij
  • Date: 2012-07-02 18:21:51 UTC
  • mfrom: (6531 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6535.
  • Revision ID: jelmer@samba.org-20120702182151-zk9utamutjtjhipq
mergeĀ lp:bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
178
178
        repository.RepositoryFormatMetaDir.register_feature("name")
179
179
        found_format.check_support_status(True)
180
180
 
181
 
    def test_register_unregister_format(self):
182
 
        # Test deprecated format registration functions
183
 
        format = SampleRepositoryFormat()
184
 
        # make a control dir
185
 
        dir = bzrdir.BzrDirMetaFormat1().initialize(self.get_url())
186
 
        # make a repo
187
 
        format.initialize(dir)
188
 
        # register a format for it.
189
 
        self.applyDeprecated(symbol_versioning.deprecated_in((2, 4, 0)),
190
 
            repository.RepositoryFormat.register_format, format)
191
 
        # which repository.Open will refuse (not supported)
192
 
        self.assertRaises(UnsupportedFormatError, repository.Repository.open,
193
 
            self.get_url())
194
 
        # but open(unsupported) will work
195
 
        self.assertEqual(format.open(dir), "opened repository.")
196
 
        # unregister the format
197
 
        self.applyDeprecated(symbol_versioning.deprecated_in((2, 4, 0)),
198
 
            repository.RepositoryFormat.unregister_format, format)
199
 
 
200
181
 
201
182
class TestRepositoryFormatRegistry(TestCase):
202
183