Introduce pytest.mark.filterwarnings

This commit is contained in:
Bruno Oliveira
2017-07-20 22:02:21 -03:00
parent abb5d20841
commit 7341da1bc1
4 changed files with 70 additions and 0 deletions

View File

@@ -59,6 +59,11 @@ def catch_warnings_for_item(item):
for arg in inifilters:
_setoption(warnings, arg)
mark = item.get_marker('filterwarnings')
if mark:
for arg in mark.args:
warnings._setoption(arg)
yield
for warning in log: