Log message for revision 76984:
  hasPackage consulted the wrong registry, oops.
  

Changed:
  U   Zope/branches/2.10/lib/python/Testing/ZopeTestCase/ZopeLite.py
  U   
Zope/branches/2.10/lib/python/Testing/ZopeTestCase/zopedoctest/testPackageAsProduct.py

-=-
Modified: Zope/branches/2.10/lib/python/Testing/ZopeTestCase/ZopeLite.py
===================================================================
--- Zope/branches/2.10/lib/python/Testing/ZopeTestCase/ZopeLite.py      
2007-06-23 12:14:40 UTC (rev 76983)
+++ Zope/branches/2.10/lib/python/Testing/ZopeTestCase/ZopeLite.py      
2007-06-23 12:16:34 UTC (rev 76984)
@@ -168,7 +168,7 @@
 
 def hasPackage(name):
     '''Checks if a package has been registered with five:registerPackage.'''
-    return name in [m.__name__ for m, f in Products._packages_to_initialize]
+    return name in [m.__name__ for m in getattr(Products, 
'_registered_packages', [])]
 
 def installPackage(name, quiet=0):
     '''Installs a registered Python package like a Zope product.'''

Modified: 
Zope/branches/2.10/lib/python/Testing/ZopeTestCase/zopedoctest/testPackageAsProduct.py
===================================================================
--- 
Zope/branches/2.10/lib/python/Testing/ZopeTestCase/zopedoctest/testPackageAsProduct.py
      2007-06-23 12:14:40 UTC (rev 76983)
+++ 
Zope/branches/2.10/lib/python/Testing/ZopeTestCase/zopedoctest/testPackageAsProduct.py
      2007-06-23 12:16:34 UTC (rev 76984)
@@ -74,6 +74,11 @@
       True
       >>> ZopeTestCase.close(app)
 
+    hasPackage still returns True
+
+      >>> ZopeTestCase.hasPackage('testpackage')
+      True
+
     Clean up
 
       >>> import testpackage

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to