[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/tests/test.py Merge revision 26851 from the ZopeX3-3.0 branch:

Fred L. Drake, Jr. fdrake at gmail.com
Fri Jul 30 13:29:48 EDT 2004


Log message for revision 26852:
  Merge revision 26851 from the ZopeX3-3.0 branch:
  improve support for additional revision control systems


Changed:
  U   Zope3/trunk/src/zope/app/tests/test.py


-=-
Modified: Zope3/trunk/src/zope/app/tests/test.py
===================================================================
--- Zope3/trunk/src/zope/app/tests/test.py	2004-07-30 17:17:17 UTC (rev 26851)
+++ Zope3/trunk/src/zope/app/tests/test.py	2004-07-30 17:29:48 UTC (rev 26852)
@@ -516,6 +516,9 @@
     return False
 
 class TestFileFinder(object):
+
+    EMPTY_FILE_LISTS = ([], ["{arch}"], ["CVS"], ["_darcs"], [".svn"])
+
     def __init__(self, prefix):
         self.files = []
         self._plen = len(prefix)
@@ -538,8 +541,8 @@
                     return
             return
         # ignore tests that aren't in packages
-        if not "__init__.py" in files:
-            if not files or files == ["CVS"] or files == [".svn"]:
+        if "__init__.py" not in files:
+            if files in self.EMPTY_FILE_LISTS:
                 return
             print "not a package", dir
             return
@@ -585,7 +588,7 @@
     except os.error:
         return
     func(arg, top, names)
-    exceptions = ('.', '..', '{arch}')
+    exceptions = ('.', '..', '{arch}', '_darcs')
     for name in names:
         if name not in exceptions:
             name = os.path.join(top, name)



More information about the Zope3-Checkins mailing list