[MERGE] Extends the launchpad plugin's implementation of lp spec urls
John Arbash Meinel
john at arbash-meinel.com
Wed Jan 23 14:20:52 GMT 2008
Tim Penhey wrote:
> Extends the launchpad plugin to handle lp urls of the form
> lp://staging/, lp://demo/, lp://dev/ to use the appropriate
> launchpad instance to do the resolution of the branch identities.
>
> This is primarily of use to Launchpad developers, but can also
> be used by other users who want to try out Launchpad as
> a branch location without messing up their public Launchpad
> account. Branches that are pushed to the staging environment
> have an expected lifetime of one day.
>
> Tim
>
> def test_suite():
> """Called by bzrlib to fetch tests for this plugin"""
> from unittest import TestSuite, TestLoader
> from bzrlib.plugins.launchpad import (
> - test_register, test_lp_indirect, test_account)
> + test_register, test_lp_indirect, test_lp_registration, test_account)
>
> loader = TestLoader()
> suite = TestSuite()
> - for m in [test_register, test_lp_indirect, test_account]:
> + for m in [test_register, test_lp_indirect, test_lp_registration,
> + test_account]:
> suite.addTests(loader.loadTestsFromModule(m))
> return suite
^- this may be a good time to consider cleaning up the test suite code
to make it easier to maintain. I would recommend:
test_names = ['bzrlib.plugins.launchpad.' + m for m in [
'test_account',
'test_register',
'test_lp_indirect',
'test_lp_registration',
]]
loader = TestLoader()
suite = loader.loadTestsFromModuleNames(test_names)
return suite
The rest seems fine.
BB:tweak
John
=:->
More information about the bazaar
mailing list