[Grok-dev] Re: Grok 0.12 should now be fixed

Uli Fouquet uli at gnufix.de
Wed Apr 23 08:12:49 EDT 2008


Hi there,

Martijn Faassen wrote:

> Thanks for the report. Joachim, do things work for you now?
> 
> It's very important to hear from anyone with problems still, if they 
> exist, as this kind of platform dependent problem is hard for us to 
> track down otherwise. Thanks again everybody for your prompt report of 
> problems!

As we are talking about problems: the testsetup support in grok.testing
in the 0.12 release is _not_ the final stuff. It is still the quick hack
from two months ago.

The more powerful testsetup support currently implemented in the
ulif-testsetup branch was not merged. My fault.

What's the difference?
----------------------

The current grok.testing.register_all_tests() was a hack that does not
support many of the options that come with z3c.testsetup, nor does it
register your local ftesting.zcml correctly (if you have a special one)
out-of-the-box.

Furthermore it is less tested while z3c.testsetup is already working in
a bunch of projects (even an implementation with limited Plone support
exists meanwhile).

The implementation in the ulif-testsetup branch is based on
z3c.testsetup and does all this more accurate.


What should you do?
-------------------

If you register your tests using simply::

   import grok
   test_suite = grok.testing.register_all_tests()

and use an ftesting.zcml which is like the one provided with Grok (or
none at all), you might go on. There won't be big API differences in
future releases.

If, however, you need more complex setups, I'd recommend to use
z3c.testsetup, which also works with older Grok releases (<0.12).

Luckily, Peter Bengtsson wrote a HOWTO, that gives you an introduction
into using Grok and z3c.testsetup with your projects::

  http://grok.zope.org/documentation/how-to/writing%2Cdiscovering%
2Crunning-tests-with-z3c.testsetup

(one line). Many thanks to Peter for this effort and his valuable hints
during writing it!

If in doubt, use Peter's HOWTO and z3c.testsetup.

What I should do
----------------

I'd like to merge the z3c.testsetup-based ulif-testsetup branch into the
trunk tomorrow evening, if there are no objections. Reviewers, please
step up now!

At the same time there will be a document published on the website
explaining usage of grok.testing.register_all_tests(), based on Peter's
HOWTO.

I'm really sorry for the mess.

-- 
Uli

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://mail.zope.org/pipermail/grok-dev/attachments/20080423/f47bef3f/attachment-0001.bin


More information about the Grok-dev mailing list