[Zope-CMF] Testing a CMF site with PyUnit

seb bacon seb@jamkit.com
Fri, 9 Nov 2001 15:46:47 +0000


the run_all_tests script in the CMF root uses zctl.py to run the
tests.  I use it to good effect.  However, strangely, zctl.py only
appears to be available in old Zope versions (look in the attic, to
find an example). 

seb

* Chris Withers <chrisw@nipltd.com> [011109 14:41]:
> Tres,
> 
> I'm hoping you've got a take on this one...
> 
> Harry Wilkinson wrote:
> > 
> > I am trying to use PyUnit to write tests for a CMF site.  Of course, to do
> > that I need to import Zope so I can do Zopeish things with it.  I'm told by
> > the all-knowing ChrisW that messing around with sys.path to get it to import
> > is considered a bad idea and I'm not really sure what the alternative is.
> 
> I remember seeing stuff on the zope-coders list about tests that import sys.path
> being and futzing with it being 'bad'. However, if you do:
> 
> python /whereever/testrunner.py -d mytestsdir
> 
> ..you can't import Zope 'cos the it's living in /wherever/your_zope_base
> 
> So, what's the 'good' way of doing this now? Is testrunner still the offical
> Zope framework to be using?
> 
> cheers,
> 
> Chris