[Zope-Checkins] CVS: Zope3/lib/python/Zope/Configuration - meta.py:1.1.2.7

Jim Fulton jim@cvs.zope.org
Tue, 19 Feb 2002 11:05:41 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/Configuration
In directory cvs.zope.org:/tmp/cvs-serv7148/lib/python/Zope/Configuration

Modified Files:
      Tag: Zope-3x-branch
	meta.py 
Log Message:
Refactored tests to use a global-data cleanup framework.
This avoids a lot of messy clean-up code needed for tests that
use global registries, such as component services.

It is really important to make sure global registries get registered
with this framework.

See the doc strings in Zope.Testing.CleannUp.


=== Zope3/lib/python/Zope/Configuration/meta.py 1.1.2.6 => 1.1.2.7 ===
 from name import resolve
 
+
 _directives = {}
 
 class InvalidDirective(Exception):
@@ -142,3 +143,8 @@
         }}}}})
 
 _clear()
+
+# Register our cleanup with Testing.CleanUp to make writing unit tests simpler.
+from Zope.Testing.CleanUp import addCleanUp
+addCleanUp(_clear)
+del addCleanUp