[Zope3-checkins] SVN: Zope3/branches/philikon-reduce-zcml/src/zope/app/schema/tests/ Don't show BBB warnings during unittests.

Philipp von Weitershausen philikon at philikon.de
Wed Mar 15 09:31:03 EST 2006


Log message for revision 66032:
  Don't show BBB warnings during unittests.
  Add BBB markers so that we'll remember to remove these tests when we finally remove
  support for the <vocabulary /> directive.
  

Changed:
  U   Zope3/branches/philikon-reduce-zcml/src/zope/app/schema/tests/keywords_vocab.zcml
  U   Zope3/branches/philikon-reduce-zcml/src/zope/app/schema/tests/simple_vocab.zcml
  U   Zope3/branches/philikon-reduce-zcml/src/zope/app/schema/tests/test_directives.py

-=-
Modified: Zope3/branches/philikon-reduce-zcml/src/zope/app/schema/tests/keywords_vocab.zcml
===================================================================
--- Zope3/branches/philikon-reduce-zcml/src/zope/app/schema/tests/keywords_vocab.zcml	2006-03-15 14:28:09 UTC (rev 66031)
+++ Zope3/branches/philikon-reduce-zcml/src/zope/app/schema/tests/keywords_vocab.zcml	2006-03-15 14:31:02 UTC (rev 66032)
@@ -1,5 +1,7 @@
 <configure xmlns="http://namespaces.zope.org/zope">
 
+  <!-- BBB 2006/02/24, to be removed after 12 months -->
+
   <include package="zope.app.schema" file="meta.zcml"/>
 
   <vocabulary

Modified: Zope3/branches/philikon-reduce-zcml/src/zope/app/schema/tests/simple_vocab.zcml
===================================================================
--- Zope3/branches/philikon-reduce-zcml/src/zope/app/schema/tests/simple_vocab.zcml	2006-03-15 14:28:09 UTC (rev 66031)
+++ Zope3/branches/philikon-reduce-zcml/src/zope/app/schema/tests/simple_vocab.zcml	2006-03-15 14:31:02 UTC (rev 66032)
@@ -1,5 +1,7 @@
 <configure xmlns="http://namespaces.zope.org/zope">
 
+  <!-- BBB 2006/02/24, to be removed after 12 months -->
+
   <include package="zope.app.schema" file="meta.zcml"/>
 
   <vocabulary

Modified: Zope3/branches/philikon-reduce-zcml/src/zope/app/schema/tests/test_directives.py
===================================================================
--- Zope3/branches/philikon-reduce-zcml/src/zope/app/schema/tests/test_directives.py	2006-03-15 14:28:09 UTC (rev 66031)
+++ Zope3/branches/philikon-reduce-zcml/src/zope/app/schema/tests/test_directives.py	2006-03-15 14:31:02 UTC (rev 66032)
@@ -15,7 +15,10 @@
 
 $Id$
 """
+# BBB 2006/02/24, to be removed after 12 months
+
 import unittest
+import warnings
 
 from zope.app.testing.placelesssetup import PlacelessSetup
 from zope.configuration import xmlconfig
@@ -35,6 +38,16 @@
     extra_keywords = {"filter": "my-filter",
                       "another": "keyword"}
 
+    def setUp(self):
+        super(DirectivesTest, self).setUp()
+        def ignorewarning(message, category, filename, lineno, file=None):
+            pass
+        warnings.showwarning = ignorewarning
+
+    def tearDown(self):
+        super(DirectivesTest, self).tearDown()
+        warnings.resetwarnings()
+
     def check_vocabulary_get(self, kw={}):
         context = object()
         registry = ZopeVocabularyRegistry()



More information about the Zope3-Checkins mailing list