[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/ Reactivated the two tests that Michael had to deactivate during the

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Oct 11 17:00:22 EDT 2005


Log message for revision 39081:
  Reactivated the two tests that Michael had to deactivate during the 
  Twisted merge. Those caused failures, because they were loading the config 
  files and not everything in the components created were cleaned up 
  properly later. Now everything is clean after a teardown again.
  
  

Changed:
  U   Zope3/trunk/src/zope/app/appsetup/appsetup.py
  U   Zope3/trunk/src/zope/app/wsgi/README.txt

-=-
Modified: Zope3/trunk/src/zope/app/appsetup/appsetup.py
===================================================================
--- Zope3/trunk/src/zope/app/appsetup/appsetup.py	2005-10-11 20:58:06 UTC (rev 39080)
+++ Zope3/trunk/src/zope/app/appsetup/appsetup.py	2005-10-11 21:00:22 UTC (rev 39081)
@@ -66,23 +66,23 @@
     causing a lot (128) of the functional tests to fail. I dont understand
     the ZCML configuration enough to fix them.
 
-      #>>> context = config(fn, features=('myFeature2', 'myFeature3'))
-      #>>> context.hasFeature('myFeature')
-      #True
-      #>>> context.hasFeature('myFeature2')
-      #True
-      #>>> context.hasFeature('myFeature3')
-      #True
-      #>>> context.hasFeature('myFeature4')
-      #True
+      >>> context = config(fn, features=('myFeature2', 'myFeature3'))
+      >>> context.hasFeature('myFeature')
+      True
+      >>> context.hasFeature('myFeature2')
+      True
+      >>> context.hasFeature('myFeature3')
+      True
+      >>> context.hasFeature('myFeature4')
+      True
 
     Further, we should have access to the configuration file name and context
     now:
 
-      #>>> getConfigSource() is fn
-      #True
-      #>>> getConfigContext() is context
-      #True
+      >>> getConfigSource() is fn
+      True
+      >>> getConfigContext() is context
+      True
 
     Let's now clean up by removing the temporary file:
 
@@ -224,7 +224,21 @@
 def getConfigSource():
     return __config_source
 
+def reset():
+    global _configured
+    _configured = False
 
+    global __config_source
+    __config_source = None
+
+    global __config_context
+    __config_context = None
+
+from zope.testing.cleanup import addCleanUp
+addCleanUp(reset)
+del addCleanUp
+
+
 # BBB
 import zope.deprecation
 IDatabaseOpenedEvent = interfaces.IDatabaseOpenedEvent

Modified: Zope3/trunk/src/zope/app/wsgi/README.txt
===================================================================
--- Zope3/trunk/src/zope/app/wsgi/README.txt	2005-10-11 20:58:06 UTC (rev 39080)
+++ Zope3/trunk/src/zope/app/wsgi/README.txt	2005-10-11 21:00:22 UTC (rev 39081)
@@ -118,13 +118,10 @@
   ... </eventlog>
   ... ''')
 
-XXX - these tests are failing. The unit tests run correctly but 128 functional
-tests are failing because of the next 3 lines.
+  >>> app = wsgi.getWSGIApplication(configFile)
+  >>> app
+  <zope.app.wsgi.WSGIPublisherApplication object at ...>
 
-  #>>> app = wsgi.getWSGIApplication(configFile)
-  #>>> app
-  #<zope.app.wsgi.WSGIPublisherApplication object at ...>
-
 About WSGI
 ----------
 



More information about the Zope3-Checkins mailing list