~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_options.py

  • Committer: Martin Pool
  • Date: 2007-02-14 07:10:27 UTC
  • mto: This revision was merged to the branch mainline in revision 2285.
  • Revision ID: mbp@sourcefrog.net-20070214071027-0fh0mtcte2kuc86o
Change register_metadir to take fully-qualified repository class name.
 
(Review suggestion from Aaron.)

Show diffs side-by-side

added added

removed removed

Lines of Context:
168
168
    def test_help(self):
169
169
        registry = bzrdir.BzrDirFormatRegistry()
170
170
        registry.register_metadir('one', 'RepositoryFormat7', 'one help')
171
 
        registry.register_metadir('two', 'RepositoryFormatKnit1', 'two help',
172
 
            repo_module='bzrlib.repofmt.knitrepo')
 
171
        registry.register_metadir('two',
 
172
            'bzrlib.repofmt.knitrepo.RepositoryFormatKnit1',
 
173
            'two help',
 
174
            )
173
175
        registry.set_default('one')
174
176
        options = [option.RegistryOption('format', 'format help', registry,
175
177
                   str, value_switches=True, title='Formats')]
191
193
                         [('hello', None, 'GAR', 'fg')])
192
194
        registry = bzrdir.BzrDirFormatRegistry()
193
195
        registry.register_metadir('one', 'RepositoryFormat7', 'one help')
194
 
        registry.register_metadir('two', 'RepositoryFormatKnit1', 'two help',
195
 
            repo_module='bzrlib.repofmt.knitrepo')
 
196
        registry.register_metadir('two',
 
197
                'bzrlib.repofmt.knitrepo.RepositoryFormatKnit1',
 
198
                'two help',
 
199
                )
196
200
        registry.set_default('one')
197
201
        opt = option.RegistryOption('format', 'format help', registry,
198
202
                                    value_switches=False)