[Distutils] [buildout] testing framework - avoiding os.popen calls

Tarek Ziadé ziade.tarek at gmail.com
Wed Jun 4 13:43:50 CEST 2008


Right now when people write tests with zc.buildout, to try out their
buildout they roughly do:

>>> from zc.buildout.testing import system
>>> system('bin/buildout -c my-config.cfg')
usual output

The problem is, the system() function uses os.popen to call the buildout
script, making it hard to debug.
For instance, you are not able to put a pdb and trace as you would do in the
same program, which is painful

What about adding in zc.buildout.testing a new function called "buildout"
that could be used to run
a buildout in the tests/doctests the same way :

>>> from zc.buildout.testing import buildout
>>> buildout('my-config.cfg')
usual output

I could do a branch for that but if everyone agrees, I guess I can push that
extra function into the trunk


Tarek Ziadé | Association AfPy | www.afpy.org
Blog FR | http://programmation-python.org
Blog EN | http://tarekziade.wordpress.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20080604/257258fc/attachment.htm>

More information about the Distutils-SIG mailing list