[CMF-checkins] CVS: Products/CMFCore/tests - test_DirectoryView.py:1.14.4.4 test_FSMetadata.py:1.3.4.4 test_FSPythonScript.py:1.5.22.3 test_FSSecurity.py:1.5.22.3

Florent Guillaume fg at nuxeo.com
Wed Nov 24 11:03:20 EST 2004


Update of /cvs-repository/Products/CMFCore/tests
In directory cvs.zope.org:/tmp/cvs-serv19002/CMFCore/tests

Modified Files:
      Tag: CMF-1_4-branch
	test_DirectoryView.py test_FSMetadata.py 
	test_FSPythonScript.py test_FSSecurity.py 
Log Message:
Removed docstrings in test methods, in favor of comments.
Docstrings are a pain when using test.py verbose mode (-vv).



=== Products/CMFCore/tests/test_DirectoryView.py 1.14.4.3 => 1.14.4.4 ===
--- Products/CMFCore/tests/test_DirectoryView.py:1.14.4.3	Fri Apr 23 17:11:35 2004
+++ Products/CMFCore/tests/test_DirectoryView.py	Wed Nov 24 11:02:49 2004
@@ -102,29 +102,27 @@
         self._registerDirectory(self)        
 
     def test_addDirectoryViews( self ):
-        """ Test addDirectoryViews  """
+        # Test addDirectoryViews
         # also test registration of directory views doesn't barf
         pass
 
     def test_DirectoryViewExists( self ):
-        """
-        Check DirectoryView added by addDirectoryViews
-        appears as a DirectoryViewSurrogate due
-        to Acquisition hackery.
-        """
+        # Check DirectoryView added by addDirectoryViews
+        # appears as a DirectoryViewSurrogate due
+        # to Acquisition hackery.
         from Products.CMFCore.DirectoryView import DirectoryViewSurrogate
         self.failUnless(isinstance(self.ob.fake_skin,DirectoryViewSurrogate))
 
     def test_DirectoryViewMethod( self ):
-        """ Check if DirectoryView method works """
+        # Check if DirectoryView method works
         self.assertEqual(self.ob.fake_skin.test1(),'test1')
 
     def test_properties(self):
-        """Make sure the directory view is reading properties"""
+        # Make sure the directory view is reading properties
         self.assertEqual(self.ob.fake_skin.testPT.title, 'Zope Pope')
 
     def test_ignored(self):
-        """ Test that the .test1.py is ignored """
+        # Test that the .test1.py is ignored
         assert('#test1' not in self.ob.fake_skin.objectIds())
 
 if DevelopmentMode:
@@ -150,39 +148,28 @@
         mkdir(self.test3path)
         
     def test_AddNewMethod( self ):
-        """
-        See if a method added to the skin folder can be found
-        """
+        # See if a method added to the skin folder can be found
         self.assertEqual(self.ob.fake_skin.test2(),'test2')
 
     def test_EditMethod( self ):
-        """
-        See if an edited method exhibits its new behaviour
-        """
+        # See if an edited method exhibits its new behaviour
         self.assertEqual(self.ob.fake_skin.test1(),'new test1')
 
     def test_NewFolder( self ):
-        """
-        See if a new folder shows up
-        """
+        # See if a new folder shows up
         from Products.CMFCore.DirectoryView import DirectoryViewSurrogate
         self.failUnless(isinstance(self.ob.fake_skin.test3,DirectoryViewSurrogate))
         self.ob.fake_skin.test3.objectIds()
 
     def test_DeleteMethod( self ):
-        """
-        Make sure a deleted method goes away
-        """
+        # Make sure a deleted method goes away
         remove(self.test2path)
         self.failIf(hasattr(self.ob.fake_skin,'test2'))
 
     def test_DeleteAddEditMethod( self ):
-        """
-        Check that if we delete a method, then add it back,
-        then edit it, the DirectoryView notices.
-
-        This excecises yet another Win32 mtime weirdity.
-        """
+        # Check that if we delete a method, then add it back,
+        # then edit it, the DirectoryView notices.
+        # This exercises yet another Win32 mtime weirdity.
         remove(self.test2path)
         self.failIf(hasattr(self.ob.fake_skin,'test2'))
             
@@ -200,9 +187,7 @@
         self.assertEqual(self.ob.fake_skin.test2(),'test2.3')
         
     def test_DeleteFolder( self ):
-        """
-        Make sure a deleted folder goes away
-        """
+        # Make sure a deleted folder goes away
         rmdir(self.test3path)
         self.failIf(hasattr(self.ob.fake_skin,'test3'))
 


=== Products/CMFCore/tests/test_FSMetadata.py 1.3.4.3 => 1.3.4.4 ===
--- Products/CMFCore/tests/test_FSMetadata.py:1.3.4.3	Fri Apr 23 17:11:35 2004
+++ Products/CMFCore/tests/test_FSMetadata.py	Wed Nov 24 11:02:49 2004
@@ -16,13 +16,13 @@
 class FSMetadata(FSSecurityBase):
 
     def _checkProxyRoles(self, obj, roles):
-        """ Test proxy roles on the object """
+        # Test proxy roles on the object
         for role in roles:
             if not obj.manage_haveProxy(role):
                 raise 'Object does not have the "%s" role' % role
 
     def test_basicPermissions(self):
-        """ Test basic FS permissions """
+        # Test basic FS permissions
         # check it has a title
         assert(self.ob.fake_skin.test6.title == 'Test object')
         self._checkSettings(
@@ -40,7 +40,7 @@
             ['Manager', 'Anonymous'])
     
     def test_proxy(self):
-        """ Test roles """
+        # Test roles
         ob = self.ob.fake_skin.test_dtml
         self._checkProxyRoles(ob, ['Manager', 'Anonymous'])
 


=== Products/CMFCore/tests/test_FSPythonScript.py 1.5.22.2 => 1.5.22.3 ===
--- Products/CMFCore/tests/test_FSPythonScript.py:1.5.22.2	Fri Apr 23 17:11:35 2004
+++ Products/CMFCore/tests/test_FSPythonScript.py	Wed Nov 24 11:02:49 2004
@@ -11,7 +11,7 @@
 class FSPythonScriptTests( FSDVTest ):
 
     def test_GetSize( self ):
-        """ Test get_size returns correct value """
+        # Test get_size returns correct value
         script = FSPythonScript('test1', join(self.skin_path_name,'test1.py'))
         self.assertEqual(len(script.read()),script.get_size())
 


=== Products/CMFCore/tests/test_FSSecurity.py 1.5.22.2 => 1.5.22.3 ===
--- Products/CMFCore/tests/test_FSSecurity.py:1.5.22.2	Fri Apr 23 17:11:35 2004
+++ Products/CMFCore/tests/test_FSSecurity.py	Wed Nov 24 11:02:49 2004
@@ -54,7 +54,7 @@
 class FSSecurityTests( FSSecurityBase ):
 
     def test_basicPermissions( self ):
-        """ Test basic FS permissions """
+        # Test basic FS permissions
         # check a normal method is as we'd expect
         self._checkSettings(self.ob.fake_skin.test1,'View',1,[])
         # now do some checks on the method with FS permissions
@@ -62,7 +62,7 @@
         self._checkSettings(self.ob.fake_skin.test4,'Access contents information',0,[])
 
     def test_invalidPermissionNames( self ):
-        """ Test for an invalid permission name """
+        # Test for an invalid permission name
         # baseline
         self._checkSettings(self.ob.fake_skin.test5,'View',1,[])
         # add .rpm with dodgy permission name
@@ -71,7 +71,7 @@
         self._checkSettings(self.ob.fake_skin.test5,'View',1,[])
         
     def test_invalidAcquireNames( self ):
-        """ Test for an invalid spelling of acquire """
+        # Test for an invalid spelling of acquire
         # baseline
         self._checkSettings(self.ob.fake_skin.test5,'View',1,[])
         # add dodgy .rpm
@@ -84,7 +84,7 @@
     class DebugModeTests( FSSecurityBase ):
         
         def test_addPRM( self ):
-            """ Test adding of a .security """
+            # Test adding of a .security
             # baseline
             self._checkSettings(self.ob.fake_skin.test5,'View',1,[])
             # add
@@ -93,7 +93,7 @@
             self._checkSettings(self.ob.fake_skin.test5,'View',1,['Manager'])
 
         def test_delPRM( self ):
-            """ Test deleting of a .security """
+            # Test deleting of a .security
             # baseline
             self._checkSettings(self.ob.fake_skin.test5,'View',1,[])
             self._writeFile('test5.py.security','View:acquire:Manager')
@@ -104,7 +104,7 @@
             self._checkSettings(self.ob.fake_skin.test5,'View',1,[])
 
         def test_editPRM( self ):
-            """ Test editing a .security """
+            # Test editing a .security
             # we need to wait a second here or the mtime will actually
             # have the same value as set in the last test.
             # Maybe someone brainier than me can figure out a way to make this
@@ -121,7 +121,7 @@
 
 
         def test_DelAddEditPRM( self ):
-            """ Test deleting, then adding, then editing a .security file """
+            # Test deleting, then adding, then editing a .security file
             # baseline
             self._writeFile('test5.py.security','View::Manager')
             # delete



More information about the CMF-checkins mailing list