[Zope3-checkins] CVS: Zope3/lib/python/Zope/Publisher/tests - BaseTestIApplicationRequest.py:1.3 BaseTestIPublicationRequest.py:1.4 BaseTestIPublisherRequest.py:1.4

Barry Warsaw barry@wooz.org
Fri, 20 Dec 2002 14:35:18 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/Publisher/tests
In directory cvs.zope.org:/tmp/cvs-serv11652/lib/python/Zope/Publisher/tests

Modified Files:
	BaseTestIApplicationRequest.py BaseTestIPublicationRequest.py 
	BaseTestIPublisherRequest.py 
Log Message:
test module cleanups:

- no docstrings in test methods (convert to comments)
- whitespace normalization
- other minor cleanups


=== Zope3/lib/python/Zope/Publisher/tests/BaseTestIApplicationRequest.py 1.2 => 1.3 ===
--- Zope3/lib/python/Zope/Publisher/tests/BaseTestIApplicationRequest.py:1.2	Mon Jun 10 19:29:33 2002
+++ Zope3/lib/python/Zope/Publisher/tests/BaseTestIApplicationRequest.py	Fri Dec 20 14:34:48 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
-# 
+#
 ##############################################################################
 """
 
@@ -26,27 +26,27 @@
 from Interface.Common.tests.BaseTestMapping \
      import testIEnumerableMapping, testIReadMapping
 
-class BaseTestIApplicationRequest(BaseTestIEnumerableMapping):
-
 
+class BaseTestIApplicationRequest(BaseTestIEnumerableMapping):
     def testVerifyIApplicationRequest(self):
         verifyObject(IApplicationRequest, self._Test__new())
 
     def testHaveCustomTestsForIApplicationRequest(self):
-        "Make sure that tests are defined for things we can't test here"
+        # Make sure that tests are defined for things we can't test here
         self.test_IApplicationRequest_body
 
     def testEnvironment(self):
-
         request = self._Test__new(foo='Foo', bar='Bar')
 
-        try: request.environment = {}
-        except AttributeError: pass
-        else: raise "Shouldn't be able to set environment"
+        try:
+            request.environment = {}
+        except AttributeError:
+            pass
+        else:
+            raise "Shouldn't be able to set environment"
 
         environment = request.environment
 
         testIReadMapping(self, environment,
                          {'foo': 'Foo', 'bar': 'Bar'},
                          ['splat'])
-


=== Zope3/lib/python/Zope/Publisher/tests/BaseTestIPublicationRequest.py 1.3 => 1.4 ===
--- Zope3/lib/python/Zope/Publisher/tests/BaseTestIPublicationRequest.py:1.3	Tue Jun 18 10:47:07 2002
+++ Zope3/lib/python/Zope/Publisher/tests/BaseTestIPublicationRequest.py	Fri Dec 20 14:34:48 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
-# 
+#
 ##############################################################################
 """
 
@@ -21,14 +21,13 @@
 from Interface.Verify import verifyObject
 from Zope.Publisher.IPublicationRequest import IPublicationRequest
 
-class BaseTestIPublicationRequest:
-
 
+class BaseTestIPublicationRequest:
     def testVerifyIPublicationRequest(self):
         verifyObject(IPublicationRequest, self._Test__new())
 
     def testHaveCustomTestsForIPublicationRequest(self):
-        "Make sure that tests are defined for things we can't test here"
+        # Make sure that tests are defined for things we can't test here
         self.test_IPublicationRequest_getPositionalArguments
 
     def testTraversalStack(self):
@@ -45,7 +44,7 @@
 
         resource = object()
         rcresource = sys.getrefcount(resource)
-        
+
         request.hold(resource)
 
         self.failUnless(sys.getrefcount(resource) > rcresource)
@@ -53,7 +52,7 @@
         request.close()
         self.failUnless(sys.getrefcount(response) < rcresponse)
         self.assertEqual(sys.getrefcount(resource), rcresource)
-        
+
     def testSkinManagement(self):
         request = self._Test__new()
         self.assertEqual(request.getPresentationSkin(), '')
@@ -65,4 +64,3 @@
         type = self._Test__expectedViewType()
         request = self._Test__new()
         self.assertEqual(request.getPresentationType(), type)
-


=== Zope3/lib/python/Zope/Publisher/tests/BaseTestIPublisherRequest.py 1.3 => 1.4 ===
--- Zope3/lib/python/Zope/Publisher/tests/BaseTestIPublisherRequest.py:1.3	Tue Jun 18 10:37:55 2002
+++ Zope3/lib/python/Zope/Publisher/tests/BaseTestIPublisherRequest.py	Fri Dec 20 14:34:48 2002
@@ -2,14 +2,14 @@
 #
 # Copyright (c) 2001, 2002 Zope Corporation and Contributors.
 # All Rights Reserved.
-# 
+#
 # This software is subject to the provisions of the Zope Public License,
 # Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
 # FOR A PARTICULAR PURPOSE.
-# 
+#
 ##############################################################################
 """
 
@@ -21,13 +21,13 @@
 from Interface.Verify import verifyObject
 from Zope.Publisher.IPublisherRequest import IPublisherRequest
 
-class BaseTestIPublisherRequest:
 
+class BaseTestIPublisherRequest:
     def testVerifyIPublisherRequest(self):
         verifyObject(IPublisherRequest, self._Test__new())
 
     def testHaveCustomTestsForIPublisherRequest(self):
-        "Make sure that tests are defined for things we can't test here"
+        # Make sure that tests are defined for things we can't test here
         self.test_IPublisherRequest_retry
         self.test_IPublisherRequest_traverse
         self.test_IPublisherRequest_processInputs
@@ -39,4 +39,3 @@
         publication = TestPublication()
         request.setPublication(publication)
         self.assertEqual(id(request.publication), id(publication))
-