tests for plugins

Jamie Wilkinson jaq at spacepants.org
Fri Nov 18 01:13:32 GMT 2005


This one time, at band camp, John A Meinel wrote:
>Jamie Wilkinson wrote:
>> How would one go about using bzr's selftest infrastructure in plugins?  Just
>> a short bit of pseudocode would suffice as an answer :)
>> 
>> Thanks
>> 
>> 
>
>If you have a plugin setup like this:
>
>  myplugin/
>    __init__.py
>    otherfiles.py
>
>Then you add a function named test_suite into __init__.py
>
>You can look at my plugin here:
>http://bzr.arbash-meinel.com/plugins/update-mirrors.py
>
>I moved the actual test code into a separate file, which only gets
>loaded if test_suite() is called.

Sweet, thanks!




More information about the bazaar mailing list