[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/apidoc/ Registered book cleanup with the teardown mechanism.

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Oct 11 16:57:14 EDT 2005


Log message for revision 39078:
  Registered book cleanup with the teardown mechanism.
  

Changed:
  U   Zope3/trunk/src/zope/app/apidoc/bookmodule/book.py
  U   Zope3/trunk/src/zope/app/apidoc/classregistry.py

-=-
Modified: Zope3/trunk/src/zope/app/apidoc/bookmodule/book.py
===================================================================
--- Zope3/trunk/src/zope/app/apidoc/bookmodule/book.py	2005-10-11 20:56:00 UTC (rev 39077)
+++ Zope3/trunk/src/zope/app/apidoc/bookmodule/book.py	2005-10-11 20:57:13 UTC (rev 39078)
@@ -62,3 +62,10 @@
 path = os.path.join(os.path.dirname(zope.app.apidoc.bookmodule.__file__),
                     'intro.txt')
 book = BookModule(_('Book'), path)
+
+def _clear():
+    global book
+    book.__init__(book.title, book.path)
+
+from zope.testing import cleanup
+cleanup.addCleanUp(_clear)

Modified: Zope3/trunk/src/zope/app/apidoc/classregistry.py
===================================================================
--- Zope3/trunk/src/zope/app/apidoc/classregistry.py	2005-10-11 20:56:00 UTC (rev 39077)
+++ Zope3/trunk/src/zope/app/apidoc/classregistry.py	2005-10-11 20:57:13 UTC (rev 39078)
@@ -21,6 +21,7 @@
 
 import sys
 
+import zope.deprecation
 from zope.app import zapi
 
 class ClassRegistry(dict):



More information about the Zope3-Checkins mailing list