Avoid displaying the same warning multiple times for an item

This commit is contained in:
Bruno Oliveira 2017-03-20 20:40:53 -03:00
parent 3373e02eae
commit d027f760c0
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ def catch_warnings_for_item(item):
args = item.config.getoption('pythonwarnings') or []
inifilters = item.config.getini("filterwarnings")
with warnings.catch_warnings(record=True) as log:
warnings.simplefilter('always')
warnings.simplefilter('once')
for arg in args:
warnings._setoption(arg)