~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: 2010-09-01 08:02:42 UTC
  • mfrom: (5390.3.3 faster-revert-593560)
  • Revision ID: pqm@pqm.ubuntu.com-20100901080242-esg62ody4frwmy66
(spiv) Avoid repeatedly calling self.target.all_file_ids() in
 InterTree.iter_changes. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005-2011 Canonical Ltd
 
1
# Copyright (C) 2005-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
24
24
    option,
25
25
    )
26
26
from bzrlib.builtins import cmd_commit
27
 
from bzrlib.commands import parse_args
 
27
from bzrlib.commands import Command, parse_args
28
28
from bzrlib.tests import TestCase
29
29
from bzrlib.repofmt import knitrepo
30
30
 
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
 
 
407
399
    def test_option_custom_help(self):
408
400
        the_opt = option.Option.OPTIONS['help']
409
401
        orig_help = the_opt.help[:]