Hide internal pytest.warns traceback

This commit is contained in:
Bruno Oliveira 2018-10-01 18:45:08 -03:00
parent bc009a8582
commit 9d971d33be
1 changed files with 2 additions and 0 deletions

View File

@ -212,6 +212,8 @@ class WarningsChecker(WarningsRecorder):
def __exit__(self, *exc_info):
super(WarningsChecker, self).__exit__(*exc_info)
__tracebackhide__ = True
# only check if we're not currently handling an exception
if all(a is None for a in exc_info):
if self.expected_warning is not None: