[Zope-Checkins] SVN: Zope/trunk/src/App/tests/test_Extensions.py Don't leave the Products.__path__ trashed.

Tres Seaver tseaver at palladion.com
Mon Apr 5 13:32:38 EDT 2010


Log message for revision 110506:
  Don't leave the Products.__path__ trashed.

Changed:
  U   Zope/trunk/src/App/tests/test_Extensions.py

-=-
Modified: Zope/trunk/src/App/tests/test_Extensions.py
===================================================================
--- Zope/trunk/src/App/tests/test_Extensions.py	2010-04-05 17:18:53 UTC (rev 110505)
+++ Zope/trunk/src/App/tests/test_Extensions.py	2010-04-05 17:32:37 UTC (rev 110506)
@@ -131,6 +131,7 @@
 
     def _makeTempProduct(self, name='foo', extname='Extensions'):
         import Products
+        self._old_Products___path__ = Products.__path__[:]
         root = self._makeTempdir()
         pdir = self._makeTempExtension(name=name, extname=extname, dir=root)
         Products.__path__ = (root,)
@@ -187,6 +188,7 @@
 
     def test_wo_checkProduct_skips_product(self):
         import Products
+        self._old_Products___path__ = Products.__path__
         del Products.__path__ # so any iteration will raise
         instdir = self._makeTempdir()
         instext = self._makeTempExtension(name=None, dir=instdir)
@@ -349,7 +351,7 @@
         MODULES = {}
         extdir = self._makeTempProduct()
         ext = self._makeFile(extdir, 'extension.py', EXTENSION_PY)
-        compile_dir(extdir)
+        compile_dir(extdir, quiet=1)
         os.remove(ext)
         found = self._callFUT('foo.extension', 'named', modules=MODULES)
         self.assertEqual(found, 'NAMED')



More information about the Zope-Checkins mailing list