[Grok-dev] grok z3c.testsetup problem

Uli Fouquet uli at gnufix.de
Fri May 8 05:34:08 EDT 2009


Hi Christian,

Christian Klinger wrote:

> thanks for your answer. But i run into a new one...
> 
> Now i have placed the nva.sliteauth under project_root/devel.
> If i start the testrunner it seems that the testrunner don´t find
> my test.
> 
> This is my tests.py in nva.sliteauth:
> 
> ####
> import z3c.testsetup
> import nva.sliteauth
> print "This file is picked up by the testrunner..." 
> 
> test_suite = z3c.testsetup.register_all_tests('nva.sliteauth')
> 
> This is the README.txt of nva.sliteauth:
> 
> Test for nva.sliteauth 
> 
> :doctest:
>    >>> import pdb; pdb.set_trace()
>    >>> 1 + 1
>    6
> 
> Any ideas where is the error?

Yes, fortunately. Not all eggs are searched by the testrunner by default
for obvious reasons, but there are (at least) two ways to let the
testrunner find your extra-egg:

1) You can go to your new egg (devel/nva.sliteauth/) and run buildout 
   and tests there.

2) You can add nva.sliteauth to the list of eggs that are searched for 
   test registrations in buildout.cfg, roughly like this::

    [test]
    recipe = zc.recipe.testrunner
    eggs = training
           nva.sliteauth
    defaults = ['--tests-pattern', '^f?tests$', '-v']

   and after rerunning buildout all tests should be found.

Hope that helps :)

Best regards,

-- 
Uli

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


More information about the Grok-dev mailing list