[Zope3-checkins] SVN: Zope3/branches/philikon-simplify-skinning/src/zope/app/publisher/browser/metaconfigure.py Ignore deprecation warnings during tests of browser:layer and browser:skin.

Philipp von Weitershausen philikon at philikon.de
Tue Feb 21 10:14:07 EST 2006


Log message for revision 41732:
  Ignore deprecation warnings during tests of browser:layer and browser:skin.
  

Changed:
  U   Zope3/branches/philikon-simplify-skinning/src/zope/app/publisher/browser/metaconfigure.py

-=-
Modified: Zope3/branches/philikon-simplify-skinning/src/zope/app/publisher/browser/metaconfigure.py
===================================================================
--- Zope3/branches/philikon-simplify-skinning/src/zope/app/publisher/browser/metaconfigure.py	2006-02-21 15:13:39 UTC (rev 41731)
+++ Zope3/branches/philikon-simplify-skinning/src/zope/app/publisher/browser/metaconfigure.py	2006-02-21 15:14:06 UTC (rev 41732)
@@ -46,6 +46,9 @@
           bbb_aware=False):
     """Provides a new layer.
 
+    First, let's ignore the warnigns:
+    >>> warnings.filterwarnings('ignore', category=DeprecationWarning)
+
     >>> class Info(object):
     ...     file = u'doctest'
     ...     line = 1
@@ -134,6 +137,9 @@
     Traceback (most recent call last):
     ...
     ConfigurationError: You cannot specify the 'interface' and 'base' together.
+
+    Enabling the warnings again:
+    >>> warnings.resetwarnings()
     """
     if name is not None and ',' in name:
         raise TypeError("Commas are not allowed in layer names.")
@@ -206,6 +212,9 @@
 def skin(_context, name=None, interface=None, layers=None):
     """Provides a new skin.
 
+    First, let's ignore the warnigns:
+    >>> warnings.filterwarnings('ignore', category=DeprecationWarning)
+
     >>> import pprint
     >>> class Info(object):
     ...     file = u'doctest'
@@ -271,6 +280,9 @@
     Traceback (most recent call last):
     ...
     ConfigurationError: You must specify the 'name' or 'interface' attribute.
+
+    Enabling the warnings again:
+    >>> warnings.resetwarnings()
     """
     if name is None and interface is None: 
         raise ConfigurationError(



More information about the Zope3-Checkins mailing list