Chris Withers wrote:
Does anyone have any experience of using zope.testing outside of Zope?

Yes, I do. It's really easy with buildout, actually.

I use zope.testing.doctest for the Twiddler tests and I'd like to use zope.testing.testrunner for running the tests in a "plain python" environment.

In particular, I'd like to see if all the Twiddler tests pass under Python 2.5.

What version of zope.testing should I use and how should I actually kick off zope.testing.testrunner?

* make your code fit buildout: project directory with your packaged code in 'src' directory, basically, and add setup.py and such. Good to do anyway for any python package. Look at existing buildouts.

Then in buildout.cfg something like (you won't need much more, I suspect):

[buildout]
develop = .
parts = test_twiddler

[test_twiddler]
recipe = zc.recipe.testrunner
eggs = TwiddlerName

where 'TwiddlerName' is the name you give the whole package in setup.py, like here:

setup(
    name='TwiddlerName',

doing 'bin/buildout'

will create a testrunner called 'test_twiddler' in the 'bin' directory under your project directory. bin/test_twiddler will then do the job.

Good luck!

Regards,

Martijn

_______________________________________________
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to