/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_options.py

  • Committer: Aaron Bentley
  • Date: 2007-02-09 07:16:20 UTC
  • mfrom: (2272 +trunk)
  • mto: (2255.6.1 dirstate)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: aaron.bentley@utoronto.ca-20070209071620-gp2n7vtjyb0f2x1e
Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
159
159
 
160
160
    def test_registry_converter(self):
161
161
        options = [option.RegistryOption('format', '',
162
 
                   bzrdir.format_registry, builtins.get_format_type)]
 
162
                   bzrdir.format_registry, bzrdir.format_registry.make_bzrdir)]
163
163
        opts, args = self.parse(options, ['--format', 'knit'])
164
164
        self.assertIsInstance(opts.format.repository_format,
165
165
                              repository.RepositoryFormatKnit1)
170
170
        registry.register_metadir('two', 'RepositoryFormatKnit1', 'two help')
171
171
        registry.set_default('one')
172
172
        options = [option.RegistryOption('format', 'format help', registry,
173
 
                   str, value_switches=True)]
 
173
                   str, value_switches=True, title='Formats')]
174
174
        parser = option.get_optparser(dict((o.name, o) for o in options))
175
175
        value = parser.format_option_help()
176
176
        self.assertContainsRe(value, 'format.*format help')
177
177
        self.assertContainsRe(value, 'one.*one help')
 
178
        self.assertContainsRe(value, 'Formats:\n *--format')
178
179
 
179
180
    def test_iter_switches(self):
180
181
        opt = option.Option('hello', help='fg')