[Grok-dev] All z3c.testsetup tests in a directory called "tests"

Peter Bengtsson peter at fry-it.com
Fri Jun 6 10:17:46 EDT 2008


I've placed all my unit tests in a folder called "tests" so it
basically looks something like this::

app.py
app_templates/index.pt
testing.py
tests.py
tests/__init__.py
tests/app.py  (containing the correct marker)

Running z3c.testsetup with ./bin/test doesn't find them!
If I rename "tests" to "unit_tests" ./bin/test finds all the tests.
If the directory is called "tests" I get:

AttributeError: 'module' object has no attribute 'test_suite'


Is there a reason for this? I kind of like putting python unit tests
in a directory called "tests".


PS. For the record, my tests.py contains this:
import z3c.testsetup
test_suite = z3c.testsetup.register_all_tests('amodulename')

-- 
Peter Bengtsson,
work www.fry-it.com
home www.peterbe.com
hobby www.issuetrackerproduct.com


More information about the Grok-dev mailing list