~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_options.py

Hide dirstate-with-subtree format

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
        registry = bzrdir.BzrDirFormatRegistry()
139
139
        registry.register_metadir('one', 'RepositoryFormat7', 'one help')
140
140
        registry.register_metadir('two', 'RepositoryFormatKnit1', 'two help')
 
141
        registry.register_metadir('hidden', 'RepositoryFormatKnit1',
 
142
            'two help', hidden=True)
141
143
        registry.set_default('one')
142
144
        options = [option.RegistryOption('format', '', registry, str)]
143
145
        opts, args = self.parse(options, ['--format', 'one'])
187
189
            'bzrlib.repofmt.knitrepo.RepositoryFormatKnit1',
188
190
            'two help',
189
191
            )
 
192
        registry.register_metadir('hidden', 'RepositoryFormat7', 'hidden help',
 
193
            hidden=True)
190
194
        registry.set_default('one')
191
195
        options = [option.RegistryOption('format', 'format help', registry,
192
196
                   str, value_switches=True, title='Formats')]
195
199
        self.assertContainsRe(value, 'format.*format help')
196
200
        self.assertContainsRe(value, 'one.*one help')
197
201
        self.assertContainsRe(value, 'Formats:\n *--format')
 
202
        self.assertNotContainsRe(value, 'hidden help')
198
203
 
199
204
    def test_iter_switches(self):
200
205
        opt = option.Option('hello', help='fg')