[Zope-CVS] CVS: Products/Basket/tests - testBasket.py:1.20
Chris McDonough
chrism at plope.com
Wed Nov 9 19:00:41 EST 2005
Update of /cvs-repository/Products/Basket/tests
In directory cvs.zope.org:/tmp/cvs-serv9534/tests
Modified Files:
testBasket.py
Log Message:
Add docs, create VERSION.txt, monkey-patch sys.modules['pkg_resources'] so Basket package authors don't need to import anything from Basket.
=== Products/Basket/tests/testBasket.py 1.19 => 1.20 ===
--- Products/Basket/tests/testBasket.py:1.19 Wed Nov 9 18:22:28 2005
+++ Products/Basket/tests/testBasket.py Wed Nov 9 19:00:41 2005
@@ -5,7 +5,7 @@
import Products
from Products.Basket.utils import EggProductContext
from Products.Basket import get_containing_package
-from Products.Basket import pkg_resources
+import pkg_resources # must come after some import of something in Basket
from OFS.ObjectManager import ObjectManager
from OFS.SimpleItem import SimpleItem
from OFS.Folder import Folder
@@ -128,6 +128,11 @@
def _makeOne(self, *arg, **kw):
klass = self._getTargetClass()
return klass(*arg, **kw)
+
+ def test_pkg_resources_monkeypatch(self):
+ self.assertEqual(sys.modules['pkg_resources'],
+ sys.modules['Basket.pkg_resources'],
+ sys.modules['Products.Basket.pkg_resources'])
def test_require_success(self):
basket = self._makeOne()
More information about the Zope-CVS
mailing list