~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_options.py

(gz) Fix test failure on alpha by correcting format string for
 gc_chk_sha1_record (Martin [gz])

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
    controldir,
23
23
    errors,
24
24
    option,
25
 
    registry,
26
25
    )
27
26
from bzrlib.builtins import cmd_commit
28
27
from bzrlib.commands import parse_args
413
412
        self.assertEqual('suggest lottery numbers', my_opt.help)
414
413
        self.assertEqual(orig_help, the_opt.help)
415
414
 
416
 
    def test_short_value_switches(self):
417
 
        reg = registry.Registry()
418
 
        reg.register('short', 'ShortChoice')
419
 
        reg.register('long', 'LongChoice')
420
 
        ropt = option.RegistryOption('choice', '', reg, value_switches=True,
421
 
            short_value_switches={'short': 's'})
422
 
        opts, args = parse([ropt], ['--short'])
423
 
        self.assertEqual('ShortChoice', opts.choice)
424
 
        opts, args = parse([ropt], ['-s'])
425
 
        self.assertEqual('ShortChoice', opts.choice)
426
 
 
427
415
 
428
416
class TestVerboseQuietLinkage(TestCase):
429
417