Log message for revision 68065:
  Implemented --nowarnings flag for the "new" test runner.
  

Changed:
  U   Zope/branches/2.9/test.py

-=-
Modified: Zope/branches/2.9/test.py
===================================================================
--- Zope/branches/2.9/test.py   2006-05-09 11:28:02 UTC (rev 68064)
+++ Zope/branches/2.9/test.py   2006-05-09 11:30:13 UTC (rev 68065)
@@ -99,4 +99,14 @@
 Initialize Zope with the given configuration file.
 """)
 
+def filter_warnings(option, opt, *ignored):
+    import warnings
+    warnings.simplefilter('ignore', Warning, append=True)
+
+testrunner.other.add_option(
+    '--nowarnings', action="callback", callback=filter_warnings,
+    help="""\
+Install a filter to suppress warnings emitted by code.
+""")
+
 sys.exit(testrunner.run(defaults))

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

Reply via email to