~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_options.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-02-07 14:12:18 UTC
  • mfrom: (2221.4.13 registryoption)
  • Revision ID: pqm@pqm.ubuntu.com-20070207141218-c474ad3d5cf88311
Turn log format into registry option, clean up registry options

Show diffs side-by-side

added added

removed removed

Lines of Context:
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')