[Grok-dev] grokproject configures z3c.testsetup instead of grok.testing

Steve Schmechel steveschmechel at yahoo.com
Fri Mar 6 20:18:37 EST 2009

Why does the latest grokproject (v1.0a2) when installing the latest grok (v1.0a1) set up a new project's test environment following the documentation that is for grok versions 0.12 and older?

I know the functionality both packages is similar and I realize grokproject can install older versions of grok, but should there be a limit or should it adjust what it creates based on the version specified?


Setup.py has a requirement for z3c.testsetup and the initial tests.py file assigns "test_suite = z3c.testsetup.register_all_tests('music')"

Following the new documentation in:

it looks like the z3c.testsetup requirement could be removed from setup.py.  (It gets pulled in by some other dependency anyway - probably grok.testing.)

More importantly, the tests.py stub can be simplified to match the newer documentation.

It goes from:

import os.path
import z3c.testsetup
import sample
from zope.app.testing.functional import ZCMLLayer
ftesting_zcml = os.path.join(
    os.path.dirname(sample.__file__), 'ftesting.zcml')
FunctionalLayer = ZCMLLayer(ftesting_zcml, __name__, 'FunctionalLayer',
test_suite = z3c.testsetup.register_all_tests('sample')


import grok
test_suite = grok.testing.register_all_tests('sample')

I don't claim to be an expert in the test framework, buildout, or grokproject so I may be missing something really critical here.

It does makes it easier to learn or teach grok when the code is simple and it matches the documentation.



More information about the Grok-dev mailing list