We’re using z3c.testsetup for quick and easy test setup. I wrote about our test setup with layers and z3c.testsetup a few weeks ago. We’ve had problems with that specific setup and I’ve spend a day devising a new setup and implementing it in three projects.
ftesting.zcmlin the tests/ directory, I’m using the
functional-zcml-layermarker to point at that file. If z3c.testsetup sees this, it sets up a functional testing layer for that ftesting.zcml file.
fixtures.zcmlincludes the ftesting.zcml and does the extra work. The tests with
functional-zcml-layer: fixtures.zcmlare run on a different functional test layer.
setup: path.to.setup_methodin my doctest and everything is set up just fine.
The top of such a doctest looks like:
.. :doctest: .. :functional-zcml-layer: ftesting.zcml .. :setup: path.to.setup_method
Now for the timely update I mentioned in the title. We also have a test
script that runs the tests of the project itself plus many dependencies. And
z3c.testsetup mixed up two test layers that both pointed at
ftesting.zcml. project1/ftesting.zcml and project2/ftesting.zcml, but
they got treated as one and the same test layer. Sigh.
But just today, z3c.testsetup 0.4 was released that fixes this very issue. A patch by Jonathan Ballet. Thanks a lot! Just-in-time bug fixing :-)
My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.
Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):