[Zope3-checkins] SVN: Zope3/branches/ZopeX3-3.0/src/zope/app/ Backported test fixes from trunk, see revision 26091.

Stephan Richter srichter at cosmos.phy.tufts.edu
Sat Jul 3 08:01:43 EDT 2004


Log message for revision 26092:
Backported test fixes from trunk, see revision 26091.



-=-
Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/apidoc/ifacemodule/browser.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/apidoc/ifacemodule/browser.py	2004-07-03 11:45:30 UTC (rev 26091)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/apidoc/ifacemodule/browser.py	2004-07-03 12:01:42 UTC (rev 26092)
@@ -234,6 +234,10 @@
           >>> pprint(type)
           [('name', 'IType'),
            ('path', 'zope.app.apidoc.ifacemodule.browser.IType')]
+
+          Cleanup
+
+          >>> directlyProvides(removeAllProxies(details.context), [])
         """
         context = removeAllProxies(self.context)
         types = list(providedBy(context))

Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/form/tests/test_utility.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/form/tests/test_utility.py	2004-07-03 11:45:30 UTC (rev 26091)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/form/tests/test_utility.py	2004-07-03 12:01:42 UTC (rev 26092)
@@ -151,6 +151,12 @@
             >>> view.foo_widget is widget
             True
 
+        We now have to cleanup, so that these tests can be run in a loop. We
+        modified the 'IContent' interface saying that 'foo' is not mandatory,
+        so we have to change that back.
+
+            >>> IContent['foo'].required = True
+
         >>> tearDown()
         """
         

Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/onlinehelp/__init__.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/onlinehelp/__init__.py	2004-07-03 11:45:30 UTC (rev 26091)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/onlinehelp/__init__.py	2004-07-03 12:01:42 UTC (rev 26092)
@@ -21,11 +21,13 @@
 
 import zope
 from zope.interface import providedBy
+from zope.testing import cleanup
 from zope.app import zapi
 
 from interfaces import IOnlineHelpTopic
 from onlinehelp import OnlineHelp
 
+
 # Global Online Help Instance
 path = os.path.join(os.path.dirname(zope.app.__file__),
                     'onlinehelp', 'help','welcome.stx')
@@ -98,3 +100,11 @@
                 break
 
     return topic
+
+
+def _clear():
+    global help
+    help.__init__(help.title, help.path)
+
+
+cleanup.addCleanUp(_clear)

Modified: Zope3/branches/ZopeX3-3.0/src/zope/app/security/tests/test_directives.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/app/security/tests/test_directives.py	2004-07-03 11:45:30 UTC (rev 26091)
+++ Zope3/branches/ZopeX3-3.0/src/zope/app/security/tests/test_directives.py	2004-07-03 12:01:42 UTC (rev 26092)
@@ -210,6 +210,10 @@
         
         self.context = xmlconfig.file("redefineperms.zcml", tests)
 
+    def tearDown(self):
+        global perms
+        perms.remove('zope.Security')
+
     def testRedefinePermission(self):
         self.assertEqual(perms, ['zope.Security'])
 



More information about the Zope3-Checkins mailing list