[Zope-Checkins] CVS: Zope/lib/python/Testing - __init__.py:1.5

Shane Hathaway shane@cvs.zope.org
Fri, 11 Jan 2002 12:07:33 -0500


Update of /cvs-repository/Zope/lib/python/Testing
In directory cvs.zope.org:/tmp/cvs-serv27070/lib/python/Testing

Modified Files:
	__init__.py 
Log Message:
These changes make it so you can safely "import Zope" in a unit test.  You
still shouldn't import Zope in unit tests, but most of the existing CMF tests
depend on importing Zope and there was a hidden exception occurring anyway.
(OFS.Application.initialize() was failing.)


=== Zope/lib/python/Testing/__init__.py 1.4 => 1.5 ===
 os.environ['SOFTWARE_HOME'] = SOFTWARE_HOME = pdir(INSTANCE_HOME)
 
-# Prevent useless initialization by pretending to be a ZEO client
-os.environ['ZEO_CLIENT'] = '1'
+# Note: we don't set os.environ['ZEO_CLIENT'] anymore because we
+# really do need all the products to be initialized.  Some tests
+# use the product registry.