[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/testing/functional.py be less agressive about wanting to find 'ftesting.zcml'.

Philipp von Weitershausen philikon at philikon.de
Tue Nov 1 12:49:19 EST 2005


Log message for revision 39819:
  be less agressive about wanting to find 'ftesting.zcml'.
  raising an error on module import isn't a good idea; in this case
  it broke several zope 3 unit (!) tests that happened to import from
  this module when they were run inside zope 2.9pre
  

Changed:
  U   Zope3/trunk/src/zope/app/testing/functional.py

-=-
Modified: Zope3/trunk/src/zope/app/testing/functional.py
===================================================================
--- Zope3/trunk/src/zope/app/testing/functional.py	2005-11-01 17:34:14 UTC (rev 39818)
+++ Zope3/trunk/src/zope/app/testing/functional.py	2005-11-01 17:49:19 UTC (rev 39819)
@@ -215,10 +215,12 @@
     Functional = os.path.join('zopeskel', 'etc', 'ftesting.zcml')
 elif os.path.exists(os.path.join('etc', 'ftesting.zcml')):
     Functional = os.path.join('etc', 'ftesting.zcml')
-elif os.path.exists('ftesting.zcml'):
+else:
+    # let's hope that the file is in our CWD. If not, we'll get an
+    # error anyways, but we can't just throw an error if we don't find
+    # that file. This module might be imported for other things as
+    # well, not only starting up Zope from ftesting.zcml.    
     Functional = 'ftesting.zcml'
-else:
-    raise IOError("No such file or directory: 'ftesting.zcml'")
 
 Functional = os.path.abspath(Functional)
 



More information about the Zope3-Checkins mailing list