CVS: Products/Zelenium - CHANGES.txt:1.37 version.txt:1.17 zuite.py:1.22

Tres Seaver <[email protected]>
Newsgroups gmane.comp.web.zope.public-cvs
Message-ID <[email protected]>
Update of /cvs-repository/Products/Zelenium
In directory cvs.zope.org:/tmp/cvs-serv4955

Modified Files:
	CHANGES.txt version.txt zuite.py 
Log Message:


  - Suites now recurse through all "folderish" subobjects, looking
    for tests (allows, for instance, tests to be loaded from disk via
    CMF's FileSystemDirectoryView).  Thanks to Malcom Cleaton for the
    patch!


=== Products/Zelenium/CHANGES.txt 1.36 => 1.37 ===
--- Products/Zelenium/CHANGES.txt:1.36	Thu Jun 30 18:23:04 2005
+++ Products/Zelenium/CHANGES.txt	Tue Aug 30 16:30:38 2005
@@ -2,6 +2,11 @@
 
   After Zelenium-0.7
 
+    - Suites now recurse through all "folderish" subobjects, looking
+      for tests (allows, for instance, tests to be loaded from disk via
+      CMF's FileSystemDirectoryView).  Thanks to Malcom Cleaton for the
+      patch!
+
     - Define zelenium_globals in __init__.py to be able to
       registerDirectoryView the 'selenium' directory.
 


=== Products/Zelenium/version.txt 1.16 => 1.17 ===
--- Products/Zelenium/version.txt:1.16	Tue Jun  7 13:41:14 2005
+++ Products/Zelenium/version.txt	Tue Aug 30 16:30:38 2005
@@ -1 +1 @@
-Zelenium-0.7
+Zelenium-0.7+


=== Products/Zelenium/zuite.py 1.21 => 1.22 ===
--- Products/Zelenium/zuite.py:1.21	Thu Jun 16 08:59:53 2005
+++ Products/Zelenium/zuite.py	Tue Aug 30 16:30:38 2005
@@ -187,14 +187,17 @@
         """ Return a list of our contents which qualify as test cases.
         """
         result = []
-        types = [ self.meta_type ]
-        types.extend( self.test_case_metatypes )
-
-        for tcid, test_case in self.objectItems( types ):
+        self._recurseListTestCases(result, prefix, self)
+        return result
+    
+    def _recurseListTestCases( self, result, prefix, ob ):
+        for tcid, test_case in ob.objectItems():
             if isinstance( test_case, self.__class__ ):
                 result.extend( test_case.listTestCases(
                                         prefix=prefix + ( tcid, ) ) )
-            else:
+            elif test_case.isPrincipiaFolderish:
+                self._recurseListTestCases(result, prefix+(tcid,), test_case)
+            elif test_case.meta_type in self.test_case_metatypes:
                 path = '/'.join( prefix + ( tcid, ) )
                 result.append( { 'id' : tcid
                                , 'title' : test_case.title_or_id()
@@ -206,9 +209,6 @@
         fsobjs = self._listFilesystemObjects()
 
         _recurseFSTestCases( result, prefix, fsobjs )
-
-        return result
-
 
 
     security.declareProtected(ManageSeleniumTestCases, 'getZipFileName')

_______________________________________________
Zope-CVS maillist  -  [email protected]
http://mail.zope.org/mailman/listinfo/zope-cvs

Zope CVS instructions: http://dev.zope.org/CVS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.