On Thu, 2009-04-16 at 20:30 +0000, James Westby wrote:
> Hi,
>
> Having a better solution for this would be great, but with the help of
> jam and vila I just knocked this up:
>
> if __name__ == '__main__':
ug.
from bzrlib import option, commands
commands.Command.hooks.install_named_hook('extend_command',
test_coverage, 'test_plugin')
def test_plugin(cmd):
if cmd.name() != 'selftest':
return
def handle_test_plugin(option, name, value, parser): cmd.additional_selftest_args['starting_with'] = \ 'bzrlib.plugins.%s' % value
cmd.takes_options = list(cmd.takes_options)
cmd.takes_options.append( option.Option('test-plugin', help='Run tests for a single named plugin', custom_callback=handle_test_plugin))
On Thu, 2009-04-16 at 20:30 +0000, James Westby wrote:
> Hi,
>
> Having a better solution for this would be great, but with the help of
> jam and vila I just knocked this up:
>
> if __name__ == '__main__':
ug.
from bzrlib import option, commands Command. hooks.install_ named_hook( 'extend_ command' ,
commands.
test_coverage, 'test_plugin')
def test_plugin(cmd): test_plugin( option, name, value, parser):
cmd.additional _selftest_ args['starting_ with'] = \
'bzrlib. plugins. %s' % value takes_options = list(cmd. takes_options) takes_options. append(
option. Option( 'test-plugin' ,
help= 'Run tests for a single named plugin',
custom_ callback= handle_ test_plugin) )
if cmd.name() != 'selftest':
return
def handle_
cmd.
cmd.