[Grok-dev] Re: z3c.testsetup 0.2.3 released

Wolfgang Schnerring wosc at wosc.de
Thu Jun 26 02:09:30 EDT 2008


* Uli Fouquet <uli at gnufix.de>[2008-06-25 18:07]:
> [snip]
>>     from zope.app.testing.functional import (
>> ImportError: No module named app.testing.functional
> I just did a quick bugfix release 0.2.3 which should fix this error and
> is now available at cheeseshop. Any feedback whether it works (without
> zope.app.testing) is welcome.

That did the trick, z3c.testsetup now works as advertised. Thanks! :-)

I would have liked to put the register_all_tests() call into __init__.py[1], but
this failes with

Traceback (most recent call last):
  File "myproject/src/helper/test/__init__.py", line 3, in ?
    test_suite = z3c.testsetup.register_all_tests('myproject.helper.test')
  File "myproject/build/eggs/z3c.testsetup-0.2.3-py2.4.egg/z3c/testsetup/__init__.py", line 16, in register_all_tests
  File "myproject/build/eggs/z3c.testsetup-0.2.3-py2.4.egg/z3c/testsetup/testgetter.py", line 44, in __init__
  File "myproject/build/eggs/z3c.testsetup-0.2.3-py2.4.egg/z3c/testsetup/util.py", line 30, in get_package
  File "myproject/build/eggs/martian-0.10-py2.4.egg/martian/scan.py", line 192, in resolve
AttributeError: 'module' object has no attribute 'test'

Is this a shortcoming of martian or inherently impossible? (My Python-fu is not
strong enough to answer that)


[1] an aside: is there a (quick) way to say "this package"? __name__ is not a
full dotted name and so won't work, and a PEP for __module__ was rejected as far
as I can see. Not having to explicitly type the package name would be really
nice, though...

More information about the Grok-dev mailing list