[CMF-checkins] CVS: Products/CMFCore/tests - test_DirectoryView.py:1.20 test_FSMetadata.py:1.7 test_FSPythonScript.py:1.9 test_FSSecurity.py:1.8

Florent Guillaume fg at nuxeo.com
Wed Nov 24 10:13:01 EST 2004


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

Modified Files:
	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.19 => 1.20 ===
--- Products/CMFCore/tests/test_DirectoryView.py:1.19	Mon May 17 09:22:49 2004
+++ Products/CMFCore/tests/test_DirectoryView.py	Wed Nov 24 10:12:30 2004
@@ -125,29 +125,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:
@@ -173,39 +171,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'))
 
@@ -222,9 +209,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.6 => 1.7 ===
--- Products/CMFCore/tests/test_FSMetadata.py:1.6	Mon Apr 26 08:14:17 2004
+++ Products/CMFCore/tests/test_FSMetadata.py	Wed Nov 24 10:12:30 2004
@@ -19,13 +19,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(
@@ -43,7 +43,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.8 => 1.9 ===
--- Products/CMFCore/tests/test_FSPythonScript.py:1.8	Mon Apr 26 08:14:17 2004
+++ Products/CMFCore/tests/test_FSPythonScript.py	Wed Nov 24 10:12:30 2004
@@ -17,7 +17,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.7 => 1.8 ===
--- Products/CMFCore/tests/test_FSSecurity.py:1.7	Mon Apr 26 08:14:17 2004
+++ Products/CMFCore/tests/test_FSSecurity.py	Wed Nov 24 10:12:30 2004
@@ -58,7 +58,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
@@ -66,7 +66,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
@@ -75,7 +75,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
@@ -88,7 +88,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
@@ -97,7 +97,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')
@@ -108,7 +108,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
@@ -124,7 +124,7 @@
             self._checkSettings(self.ob.fake_skin.test5,'View',1,['Manager'])
 
         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