Commit df3f7661 authored by Tres Seaver's avatar Tres Seaver

Suppress and test expected warnings emitted by ZCML class-requires.

parent 2c5695e5
...@@ -276,7 +276,17 @@ def test_set_warnings(): ...@@ -276,7 +276,17 @@ def test_set_warnings():
Running this should not throw an exception (but will print a warning to Running this should not throw an exception (but will print a warning to
stderr) stderr)
>>> zcml.load_string(configure_zcml) >>> from warnings import catch_warnings
>>> warned = []
>>> with catch_warnings(record=True) as trapped:
... zcml.load_string(configure_zcml)
... warned.extend(list(trapped))
>>> len(warned)
2
>>> str(warned[0].message)
'The set_schema option...'
>>> str(warned[1].message)
'The set_attribute option...'
>>> tearDown() >>> tearDown()
""" """
......
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