[Zope-CMF] unit test weirdness.

Tres Seaver tseaver@zope.com
20 Feb 2003 12:11:21 -0500


On Thu, 2003-02-20 at 11:56, Lennart Regebro wrote:
> Tres Seaver wrote:
> > utilitiies/testrunner.py is not friendly to "third-party" products,
> > installed outside of $SOFTWARE_HOME/lib/python/Products.
> 
> Well, yeas, but that's just because it doesn't add anything else that 
> lib/python to sys.path, right? Changing that to setting up the same 
> sys.path as z2.py does would fix that, I think. Or?


The specific extra plumbing needed by third-party products is getting
$INSTANCE_HOME/Products directory (and the PRODUCTS_PATH bit, too) into
the Products package *before* importing *anything* from the product.

I would prefer that this wiring be spelled from unit tests as:

  from Zope.App.startup import configureProductsPath
  configureProductsPath()

but that spelling isn't there yet.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com