Commit d2101e5b authored by Stefan H. Holek's avatar Stefan H. Holek

Implemented --nowarnings flag for the "new" test runner.

parent e57001e1
......@@ -99,4 +99,14 @@ testrunner.setup.add_option(
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))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment