[MERGE] New test loader for selftest --load-list
Robert Collins
robertc at robertcollins.net
Tue Apr 1 22:22:17 BST 2008
On Tue, 2008-04-01 at 12:15 +0200, Vincent Ladeuil wrote:
bb:approve
The following method name is confusingly similar to the one it actually
calls with but with a different protocol. If you cant think of a
variation that is clearer, its ok.
> === modified file 'bzrlib/plugin.py'
> --- bzrlib/plugin.py 2008-03-17 13:10:32 +0000
> +++ bzrlib/plugin.py 2008-03-26 11:29:40 +0000
> @@ -407,13 +407,28 @@
> else:
> return None
>
> + def load_tests(self, loader):
> + """Return the adapted plugin's test suite.
> +
> + :param loader: The custom loader that should be used to load additional
> + tests.
> +
> + Note that TestUtil.TestLoader defines load_tests(self, standard_tests,
> + module, loader), but here we are handling the associated plugin module
> + ourselves.
> + """
> + if getattr(self.module, 'load_tests', None) is not None:
> + return loader.loadTestsFromModule(self.module)
> + else:
> + return None
> +
--
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/20080402/e2f363ab/attachment.pgp
More information about the bazaar
mailing list