[Grok-dev] grok z3c.testsetup problem
Christian Klinger
cklinger at novareto.de
Fri May 8 05:01:31 EDT 2009
Hi Uli,
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?
Thanks again.
Christian
> Hi there,
>
> Christian Klinger wrote:
>
>> i run into a testing problem. This is my scenario:
>>
>> I have a grokproject called training. In the src
>> package of training i have a new python package
>> called nva.sliteauth. I have added nva.sliteauth to
>> setup.py install_requires and buildout´s development
>> section.
>
> I guess you mixed up eggs and packages here somehow.
>
> Do you have an __init__.py in ``nva.sliteauth/``? Your output looks a
> bit like it. This would make your nva.sliteauth directory become a
> (toplevel) part of the ``training`` egg as well.
>
> If `nva.sliteauth/` contains a different egg (with an own setup.py,
> etc., but without an __init__.py), why do you put it into your
> ``training`` egg sources? I'd assume the usual way would be to put
> ``nva.sliteauth/`` in the project root (not: src/).
>
> OTOH: if `nva.sliteauth` was meant to be another toplevel package of the
> ``training`` egg, why don't you simply remove ``nva.sliteauth`` so that
> you get
>
> src/
> |
> + training/
> |
> + nva/
> | |
> | + sliteauth/
>
>
> In this case you wouldn't have to fiddle with ``training``s setup.py.
>
> [snip]
>
> But you certainly want to become ``nva.sliteauth`` a different egg,
> right?
>
>> Test-module import failures:
>>
>> Module: nva.sliteauth.nva.sliteauth.tests
>>
>> ImportError: No module named nva.sliteauth.tests
>
> Apparently the testrunner searches for a package ``nva`` in the
> ``nva.sliteauth`` package (not: egg). This makes me think there is
> something wrong in the root dir of the ``nva.sliteauth`` egg.
>
> Best regards,
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev
More information about the Grok-dev
mailing list