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

Fred L. Drake, Jr. fred@zope.com
Tue, 11 Feb 2003 12:17:40 -0500


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

Modified Files:
	__init__.py 
Log Message:
Add the App.config module and use the API it exports to get configuration
values.


=== Zope/lib/python/Testing/__init__.py 1.7 => 1.8 ===
--- Zope/lib/python/Testing/__init__.py:1.7	Fri Feb  7 16:28:13 2003
+++ Zope/lib/python/Testing/__init__.py	Tue Feb 11 12:17:08 2003
@@ -17,13 +17,13 @@
 """
 import os
 
-# Set the INSTANCE_HOME to the Testing package directory
-os.environ['INSTANCE_HOME'] = INSTANCE_HOME = os.path.dirname(__file__)
+import App.config
+
+cfg = App.config.getConfiguration()
 
-# Set the SOFTWARE_HOME to the directory containing the Testing package
-# XXX This isn't a change, so why?
-os.environ['SOFTWARE_HOME'] = SOFTWARE_HOME = os.path.dirname(INSTANCE_HOME)
+# Set the INSTANCE_HOME to the Testing package directory
+cfg.instancehome = os.path.dirname(__file__)
 
-# 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.
+# Make sure this change is propogated to all the legacy locations for
+# this information.
+App.config.setConfiguration(cfg)