/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_options.py

  • Committer: Vincent Ladeuil
  • Date: 2008-10-01 10:23:36 UTC
  • mto: This revision was merged to the branch mainline in revision 3759.
  • Revision ID: v.ladeuil+lp@free.fr-20081001102336-unf0wqcvw51x8igr
Fix --verbose leaking into blackbox tests.

* bzrlib/commands.py:
(run_bzr): Save/restore verbosity_level to avoid leaks.

* bzrlib/tests/test_options.py:
(TestOptionDefinitions.test_option_grammar): Don't use 'option'
module name as a variable name.

* bzrlib/option.py:
(MergeTypeRegistry): Cleanup. This has been separated from the
related code by the '_verbosity_level' definition/code insertion.
(timezone): Respect style rules.

* bzrlib/builtins.py:
(cmd_log): Don't mask the global option for no good reason (or
should we delete the global option instead ?).

Show diffs side-by-side

added added

removed removed

Lines of Context:
353
353
        # period and be all on a single line, because the display code will
354
354
        # wrap it.
355
355
        option_re = re.compile(r'^[A-Z][^\n]+\.$')
356
 
        for scope, option in self.get_builtin_command_options():
357
 
            if not option.help:
358
 
                msgs.append('%-16s %-16s %s' %
359
 
                       ((scope or 'GLOBAL'), option.name, 'NO HELP'))
360
 
            elif not option_re.match(option.help):
361
 
                msgs.append('%-16s %-16s %s' %
362
 
                        ((scope or 'GLOBAL'), option.name, option.help))
 
356
        for scope, opt in self.get_builtin_command_options():
 
357
            if not opt.help:
 
358
                msgs.append('%-16s %-16s %s' %
 
359
                       ((scope or 'GLOBAL'), opt.name, 'NO HELP'))
 
360
            elif not option_re.match(opt.help):
 
361
                msgs.append('%-16s %-16s %s' %
 
362
                        ((scope or 'GLOBAL'), opt.name, opt.help))
363
363
        if msgs:
364
364
            self.fail("The following options don't match the style guide:\n"
365
365
                    + '\n'.join(msgs))