[RFC/MERGE](0.17) Auto load tests
Robert Collins
robertc at robertcollins.net
Mon Apr 30 21:33:10 BST 2007
On Mon, 2007-04-30 at 09:21 -0500, John Arbash Meinel wrote:
>
> Having auto-discovery means that my test suite doesn't need to know
> where it is located.
>
> I realize I could do something like:
>
> tests = [
> 'test_bar',
> 'test_foo',
> ]
>
> tests = [__name__ + '.' + test for test in tests]
>
> Which is at least more tasteful than prefixing everything.
Well, so do relative imports - 'test_bar' and 'test_foo' will import
just fine from within bzrlib.plugins.foo.tests.
I think its reasonable if your library stops being a bzrlib plugin that
you change it - you'll be changing INSTALL, README, docstrings at a
minimum :).
-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/20070501/a8bb4071/attachment.pgp
More information about the bazaar
mailing list