[Zope3-checkins] SVN: Zope3/branches/jim-adapter/src/zope/traversing/ Stop using placesssetup. It's not needed for the tests.

Philipp von Weitershausen philikon at philikon.de
Wed Apr 5 10:40:27 EDT 2006


Log message for revision 66544:
  Stop using placesssetup. It's not needed for the tests.
  

Changed:
  U   Zope3/branches/jim-adapter/src/zope/traversing/namespace.py
  U   Zope3/branches/jim-adapter/src/zope/traversing/tests/test_lang.py
  U   Zope3/branches/jim-adapter/src/zope/traversing/tests/test_namespacetrversal.py
  U   Zope3/branches/jim-adapter/src/zope/traversing/tests/test_physicallocationadapters.py
  U   Zope3/branches/jim-adapter/src/zope/traversing/tests/test_presentation.py
  U   Zope3/branches/jim-adapter/src/zope/traversing/tests/test_skin.py

-=-
Modified: Zope3/branches/jim-adapter/src/zope/traversing/namespace.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/namespace.py	2006-04-05 14:36:17 UTC (rev 66543)
+++ Zope3/branches/jim-adapter/src/zope/traversing/namespace.py	2006-04-05 14:40:26 UTC (rev 66544)
@@ -43,9 +43,6 @@
        Let's start with adapter-based transersal. We're going to use the
        component architecture, so we'll need to initialize it:
 
-         >>> from zope.app.testing.placelesssetup import setUp, tearDown
-         >>> setUp()
-
          >>> class I(zope.interface.Interface):
          ...     'Test interface'
          >>> class C(object):
@@ -95,8 +92,6 @@
 
          >>> namespaceLookup('foo', 'bar', C(), request)
          'barfromview'
-
-         >>> tearDown()
        """
 
     if request is not None:
@@ -415,8 +410,6 @@
 
            To demonstrate this, we need to register some adapters:
 
-             >>> from zope.app.testing.placelesssetup import setUp, tearDown
-             >>> setUp()
              >>> from zope.app.testing import ztapi
              >>> def adapter1(ob):
              ...     return 1
@@ -438,10 +431,6 @@
              ... except TraversalError:
              ...     print 'no adapter'
              no adapter
-
-           Cleanup:
-
-             >>> tearDown()
            """
         try:
             return zope.component.getAdapter(self.context, IPathAdapter, name)

Modified: Zope3/branches/jim-adapter/src/zope/traversing/tests/test_lang.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/tests/test_lang.py	2006-04-05 14:36:17 UTC (rev 66543)
+++ Zope3/branches/jim-adapter/src/zope/traversing/tests/test_lang.py	2006-04-05 14:40:26 UTC (rev 66544)
@@ -19,28 +19,23 @@
 
 from zope.interface import directlyProvides
 from zope.publisher.interfaces.http import IHTTPRequest
+from zope.publisher.tests import test_browserlanguages
 from zope.i18n.interfaces import IModifiableUserPreferredLanguages
+from zope.traversing.namespace import lang
 
-from zope.publisher.tests import test_browserlanguages
-
 from zope.app.testing import ztapi
 from zope.app.annotation import IAttributeAnnotatable, IAnnotations
 from zope.app.annotation.attribute import AttributeAnnotations
 from zope.app.publisher.browser import ModifiableBrowserLanguages
-from zope.app.testing.placelesssetup import PlacelessSetup
 
-from zope.traversing.namespace import lang
-
-
 class TestRequest(test_browserlanguages.TestRequest):
 
     def shiftNameToApplication(self):
         self.shifted = True
 
-class Test(PlacelessSetup, unittest.TestCase):
+class Test(unittest.TestCase):
 
     def setUp(self):
-        super(Test, self).setUp()
         self.request = TestRequest("en")
         directlyProvides(self.request, IHTTPRequest, IAttributeAnnotatable)
         ztapi.provideAdapter(IAttributeAnnotatable, IAnnotations,

Modified: Zope3/branches/jim-adapter/src/zope/traversing/tests/test_namespacetrversal.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/tests/test_namespacetrversal.py	2006-04-05 14:36:17 UTC (rev 66543)
+++ Zope3/branches/jim-adapter/src/zope/traversing/tests/test_namespacetrversal.py	2006-04-05 14:40:26 UTC (rev 66544)
@@ -18,11 +18,8 @@
 from unittest import main
 from zope.testing.doctestunit import DocTestSuite
 
-from zope.app.testing.placelesssetup import setUp, tearDown
-
 def test_suite():
-    return DocTestSuite('zope.traversing.namespace',
-                        setUp=setUp, tearDown=tearDown)
+    return DocTestSuite('zope.traversing.namespace')
 
 if __name__ == '__main__':
     main(defaultTest='test_suite')

Modified: Zope3/branches/jim-adapter/src/zope/traversing/tests/test_physicallocationadapters.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/tests/test_physicallocationadapters.py	2006-04-05 14:36:17 UTC (rev 66543)
+++ Zope3/branches/jim-adapter/src/zope/traversing/tests/test_physicallocationadapters.py	2006-04-05 14:40:26 UTC (rev 66544)
@@ -16,12 +16,11 @@
 $Id$
 """
 from unittest import TestCase, main, makeSuite
-from zope.app.testing.placelesssetup import PlacelessSetup
-from zope.app.testing import ztapi, setup
 from zope.interface import implements
 from zope.traversing.interfaces import IContainmentRoot
 from zope.traversing.interfaces import IPhysicallyLocatable
 
+from zope.app.testing import ztapi, setup
 from zope.app.container.contained import contained
 from zope.app.component.site import SiteManagerContainer
 
@@ -36,7 +35,7 @@
     pass
 
 
-class Test(PlacelessSetup, TestCase):
+class Test(TestCase):
 
     def test(self):
         setup.setUpTraversal()

Modified: Zope3/branches/jim-adapter/src/zope/traversing/tests/test_presentation.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/tests/test_presentation.py	2006-04-05 14:36:17 UTC (rev 66543)
+++ Zope3/branches/jim-adapter/src/zope/traversing/tests/test_presentation.py	2006-04-05 14:40:26 UTC (rev 66544)
@@ -21,7 +21,6 @@
 from zope.publisher.browser import TestRequest
 
 from zope.app.testing import ztapi
-from zope.app.testing.placelesssetup import PlacelessSetup
 
 class IContent(Interface):
     pass
@@ -40,7 +39,7 @@
         self.content = content
 
 
-class Test(PlacelessSetup, TestCase):
+class Test(TestCase):
 
     def testView(self):
         ztapi.browserView(IContent, 'foo', View)

Modified: Zope3/branches/jim-adapter/src/zope/traversing/tests/test_skin.py
===================================================================
--- Zope3/branches/jim-adapter/src/zope/traversing/tests/test_skin.py	2006-04-05 14:36:17 UTC (rev 66543)
+++ Zope3/branches/jim-adapter/src/zope/traversing/tests/test_skin.py	2006-04-05 14:40:26 UTC (rev 66544)
@@ -20,7 +20,6 @@
 
 from zope.publisher.interfaces.browser import IBrowserSkinType
 from zope.app.testing import ztapi
-from zope.app.testing.placelesssetup import PlacelessSetup
 
 
 class FauxRequest(object):
@@ -32,7 +31,7 @@
 directlyProvides(IFoo, IBrowserSkinType)
 
 
-class Test(PlacelessSetup, TestCase):
+class Test(TestCase):
 
     def setUp(self):
         super(Test, self).setUp()



More information about the Zope3-Checkins mailing list