[Grok-dev] Re: Running tests
Philipp von Weitershausen
philipp at weitershausen.de
Mon Jun 11 08:03:17 EDT 2007
Luciano Ramalho wrote:
> Yesterday Leo Rochael visited me and we were implemented a few tests
> in one of my sample apps.
>
> Maybe we missed something obvious, but we could only run unit tests
> after invoking them like this:
>
> ~/gsoc2007/Adder $ ./parts/instance/bin/test
> --path=/usr/local/Zope-3.3.1/lib/python --path=src `for i in eggs/*;
> do echo --path=$i; done` -s adder
>
> Is there an easier way of running tests for Grok apps?
Add this to your buildout.cfg:
[test]
recipe = zc.recipe.testrunner
eggs = YOURPROJECT
extra-paths = {zope3:location}/lib/python
working-directory = parts/instance
defaults = ['--tests-pattern', '^f?tests$', '-v']
and run bin/buildout. You will then have a bin/test script that will run
the tests of YOURPROJECT.
--
http://worldcookery.com -- Professional Zope documentation and training
More information about the Grok-dev
mailing list