~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_options.py

  • Committer: Martin Pool
  • Date: 2011-01-20 23:07:25 UTC
  • mfrom: (5626 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5630.
  • Revision ID: mbp@canonical.com-20110120230725-12l7ltnko5x3fgnz
merge news

Show diffs side-by-side

added added

removed removed

Lines of Context:
396
396
        self.assertTrue(format.is_hidden('hidden'))
397
397
        self.assertFalse(format.is_hidden('visible'))
398
398
 
 
399
    def test_short_name(self):
 
400
        registry = controldir.ControlDirFormatRegistry()
 
401
        opt = option.RegistryOption('format', help='', registry=registry)
 
402
        self.assertEquals(None, opt.short_name())
 
403
        opt = option.RegistryOption('format', short_name='F', help='',
 
404
            registry=registry)
 
405
        self.assertEquals('F', opt.short_name())
 
406
 
399
407
    def test_option_custom_help(self):
400
408
        the_opt = option.Option.OPTIONS['help']
401
409
        orig_help = the_opt.help[:]