[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/zapi/tests.py Turn off deprecation warnings when testing the zapi interface, since

Jim Fulton jim at zope.com
Thu Nov 17 15:49:17 EST 2005


Log message for revision 40197:
  Turn off deprecation warnings when testing the zapi interface, since
  it includes a deprecated attribute.
  

Changed:
  U   Zope3/trunk/src/zope/app/zapi/tests.py

-=-
Modified: Zope3/trunk/src/zope/app/zapi/tests.py
===================================================================
--- Zope3/trunk/src/zope/app/zapi/tests.py	2005-11-17 17:36:19 UTC (rev 40196)
+++ Zope3/trunk/src/zope/app/zapi/tests.py	2005-11-17 20:49:16 UTC (rev 40197)
@@ -28,12 +28,19 @@
         """
         Ensure that the zapi module provides the IZAPI interface
         """
+        
         from zope.app import zapi
         # deprecation proxies don't seem to always work with
         # verifyObject, so remove any proxies
         if isProxy(zapi):
             zapi = removeAllProxies(zapi)
+
+        # we don't want to generate warnings for deprecated
+        # attrs
+        import zope.deprecation
+        zope.deprecation.__show__.off()
         verifyObject(IZAPI, zapi)
+        zope.deprecation.__show__.on()
         
 
 def setUp(test):



More information about the Zope3-Checkins mailing list