~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_options.py

  • Committer: Andrew Bennetts
  • Date: 2007-08-30 08:11:54 UTC
  • mfrom: (2766 +trunk)
  • mto: (2535.3.55 repo-refactor)
  • mto: This revision was merged to the branch mainline in revision 2772.
  • Revision ID: andrew.bennetts@canonical.com-20070830081154-16hebp2xwr15x2hc
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
296
296
        if msgs:
297
297
            self.fail("The following options don't match the style guide:\n"
298
298
                    + '\n'.join(msgs))
 
299
 
 
300
    def test_is_hidden(self):
 
301
        registry = bzrdir.BzrDirFormatRegistry()
 
302
        registry.register_metadir('hidden', 'HiddenFormat',
 
303
            'hidden help text', hidden=True)
 
304
        registry.register_metadir('visible', 'VisibleFormat',
 
305
            'visible help text', hidden=False)
 
306
        format = option.RegistryOption('format', '', registry, str)
 
307
        self.assertTrue(format.is_hidden('hidden'))
 
308
        self.assertFalse(format.is_hidden('visible'))