[Distutils] buildout, zc.recipe.testrunner and tests_require

Nathan R. Yergler nathan at yergler.net
Sun Mar 11 16:08:43 CET 2007


I'm using zc,buildout to manage the development of a very simple web
application.  I'd like to have a simple test runner that runs my
doctests, but have run into a slight problem.  I'm using
wsgi_intercept to aid in testing, but unfortunately wsgi_intercept
isn't a proper Python package ("yet", according to Titus).  So I have
a package-i-fied version in my svn repository and in my buildout.cfg I
specify:

develop = . ./wsgi_intercept_

I initially was using the "interpreter" option to get a Python
interpreter with my eggs on the path, and running "./bin/python
setup.py test".  That, however, required me to list wsgi_intercept as
a package requirement, when I really want to list it as a testing
requirement.  Moving it to a testing requirement caused it's develop
egg not to be on the PYTHONPATH, so setuptools tries to find it.
Which it couldn't.

I tried using zc.recipe.testbrowser, thinking that maybe it'd look at
the tests_require for the target eggs, but no such luck.  The
testrunner also seems pretty promiscuous in looking for things to test
(it tries to import my eggs directory and test them which predictably
doesn't work), but that's another story.

So... any suggestions on using zc.buildout along with testing
dependencies (generally or with zc.recipe.testrunner)?

Thanks,

Nathan


More information about the Distutils-SIG mailing list