running 'bzr selftest' on windows

Martin Pool mbp at canonical.com
Mon Mar 1 03:09:18 GMT 2010


On 28 February 2010 02:16, Jelmer Vernooij <jelmer at samba.org> wrote:
> On Sat, 2010-02-27 at 16:00 +0100, Vincent Ladeuil wrote:
>> >>>>> "Matt" == Matt Nordhoff <mnordhoff at mattnordhoff.com> writes:
>>     Matt> test_prefix_alias_registry.register('bd', 'bzrlib.doc')
>>     Matt> test_prefix_alias_registry.register('bu', 'bzrlib.utils')
>>     Matt> test_prefix_alias_registry.register('bt', 'bzrlib.tests')
>>     Matt> test_prefix_alias_registry.register('bb', 'bzrlib.tests.blackbox')
>>     Matt> test_prefix_alias_registry.register('bp', 'bzrlib.plugins')
>>
>> A comment above this line says:
>>
>>   # Obvious highest levels prefixes, feel free to add your own via a plugin
>>
>> So you can do:
>>
>>   bzrlib.tests.test_prefix_alias_registry.register('grep', 'bzrlib.plugins.grep')
>>
>> And use:
>>
>>   bzr selftest -s grep
>>
>> To avoid excessive pollution of the name space, you may do that in
>> an another dedicated plugin though.
> Is there some way to do this without forcing the import of bzrlib.tests
> in the plugins' __init__? I'm quite keen on using these shortcuts, but
> I'd rather not slow down the plugins.

Note that at the moment you should be able to say

bzr selftest -s bp.grep

to run just those tests.

For other plugins that cause eg new formats or transports to be
registered, or that override existing commands, just running their own
tests may not be enough.

-- 
Martin <http://launchpad.net/~mbp/>



More information about the bazaar mailing list