[Zope-Checkins] SVN: Zope/trunk/lib/python/Zope2/Startup/tests/test
Startup tests left a tainted Products.__path__.
Stefan H. Holek
stefan at epy.co.at
Thu Jul 12 06:11:13 EDT 2007
Log message for revision 77723:
Startup tests left a tainted Products.__path__.
Changed:
U Zope/trunk/lib/python/Zope2/Startup/tests/testStarter.py
U Zope/trunk/lib/python/Zope2/Startup/tests/test_schema.py
U Zope/trunk/lib/python/Zope2/Startup/tests/test_warnfilter.py
-=-
Modified: Zope/trunk/lib/python/Zope2/Startup/tests/testStarter.py
===================================================================
--- Zope/trunk/lib/python/Zope2/Startup/tests/testStarter.py 2007-07-12 09:49:28 UTC (rev 77722)
+++ Zope/trunk/lib/python/Zope2/Startup/tests/testStarter.py 2007-07-12 10:11:13 UTC (rev 77723)
@@ -26,6 +26,7 @@
from ZConfig.components.logger.loghandler import NullHandler
import Zope2.Startup
+import Products
from App.config import getConfiguration, setConfiguration
@@ -63,6 +64,8 @@
os.rmdir(TEMPNAME)
except:
pass
+ Products.__path__ = [d for d in Products.__path__
+ if os.path.exists(d)]
test_logger.LoggingTestBase.tearDown(self)
# reset logger states
for name in (None, 'access', 'trace'):
Modified: Zope/trunk/lib/python/Zope2/Startup/tests/test_schema.py
===================================================================
--- Zope/trunk/lib/python/Zope2/Startup/tests/test_schema.py 2007-07-12 09:49:28 UTC (rev 77722)
+++ Zope/trunk/lib/python/Zope2/Startup/tests/test_schema.py 2007-07-12 10:11:13 UTC (rev 77723)
@@ -21,6 +21,7 @@
import ZConfig
import Zope2.Startup
+import Products
from Zope2.Startup import datatypes
@@ -43,6 +44,10 @@
if self.schema is None:
StartupTestCase.schema = getSchema()
+ def tearDown(self):
+ Products.__path__ = [d for d in Products.__path__
+ if os.path.exists(d)]
+
def load_config_text(self, text):
# We have to create a directory of our own since the existence
# of the directory is checked. This handles this in a
Modified: Zope/trunk/lib/python/Zope2/Startup/tests/test_warnfilter.py
===================================================================
--- Zope/trunk/lib/python/Zope2/Startup/tests/test_warnfilter.py 2007-07-12 09:49:28 UTC (rev 77722)
+++ Zope/trunk/lib/python/Zope2/Startup/tests/test_warnfilter.py 2007-07-12 10:11:13 UTC (rev 77723)
@@ -23,6 +23,7 @@
import ZConfig
import Zope2.Startup
+import Products
from Zope2.Startup import datatypes
@@ -52,6 +53,8 @@
def tearDown(self):
warnings.filters[:] = self.original_warning_filters
+ Products.__path__ = [d for d in Products.__path__
+ if os.path.exists(d)]
def load_config_text(self, text):
# We have to create a directory of our own since the existence
More information about the Zope-Checkins
mailing list