[RFC] loading plugins with test flag

Robert Collins robertc at robertcollins.net
Tue Dec 20 02:11:42 GMT 2005


On Fri, 2005-12-16 at 09:03 -0600, John Arbash Meinel wrote:
> I don't really know how to implement this, but I know that I've written
> a couple of plugins which break the test suite, by changing the default
> behavior of certain commands. On the other hand, I have plugins which
> are meant to end up in core, and I *do* want to have the tests run on them.
> Right now the only flag we have is a big --no-plugins which enables or
> disables all of them.
> 
> I thought it might be nice if there was some way that when a plugin is
> loaded it could know if tests were running. So if it knows that loading
> itself will break the test suite, it can gracefully not install itself.

quick hack:
In your plugins test_suite() method, uninstall your plugin.

More generally, I don't think its reasonable to assume that you will
either run or be tested. This is because plugins can reasonably do
things like run the test suite during commit or branch.


Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051220/4e1d99a1/attachment.pgp 


More information about the bazaar mailing list