[Zope-CVS] CVS: Products/Basket/tests - testBasket.py:1.26
Chris McDonough
chrism at plope.com
Thu Nov 10 14:37:15 EST 2005
Update of /cvs-repository/Products/Basket/tests
In directory cvs.zope.org:/tmp/cvs-serv5000/tests
Modified Files:
testBasket.py
Log Message:
Ensure that distros blown out to tempfiles have the correct metadata.
=== Products/Basket/tests/testBasket.py 1.25 => 1.26 ===
--- Products/Basket/tests/testBasket.py:1.25 Thu Nov 10 13:58:31 2005
+++ Products/Basket/tests/testBasket.py Thu Nov 10 14:37:14 2005
@@ -292,6 +292,12 @@
self.failUnless(os.path.isfile(os.path.join(pkgdir, '__init__.py')))
self.failUnless(os.path.isfile(os.path.join(pkgdir, 'test_image.jpg')))
self.failUnless(os.path.realpath(eggdir) in sys.path)
+ self.failUnless(os.path.realpath(eggdir) in self.working_set.entries)
+
+ points = list(pkg_resources.iter_entry_points('zope2.initialize'))
+ self.assertEqual(len(points), 1)
+ self.assertEqual(points[0].module_name, 'notzipsafe')
+
basket.cleanup()
self.failIf(os.path.exists(tempdir))
@@ -303,7 +309,7 @@
self.working_set.add_entry(self.fixtures)
distributions = basket.product_distributions_by_dwim()
- expected = [ 'diskproduct1', 'product1', 'product2' ]
+ expected = [ 'diskproduct1', 'product1', 'product2', 'notzipsafe']
# don't consider other eggs that happen to be on the path, only
# test that we find the things that are in our fixture dir
actual = [ dist.key for dist in distributions if dist.key in expected ]
@@ -397,10 +403,12 @@
import Products.product1
import Products.product2
import Products.diskproduct1
+ import notzipsafe
self.failUnless(sys.modules.has_key('Products.product1'))
self.failUnless(sys.modules.has_key('Products.product2'))
self.failUnless(sys.modules.has_key('Products.diskproduct1'))
+ self.failUnless(sys.modules.has_key('notzipsafe'))
def test_get_containing_package(self):
self.assertEqual(
More information about the Zope-CVS
mailing list