We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c46a22 commit 0229896Copy full SHA for 0229896
_pytest/recwarn.py
@@ -216,8 +216,8 @@ def __exit__(self, *exc_info):
216
# only check if we're not currently handling an exception
217
if all(a is None for a in exc_info):
218
if self.expected_warning is not None:
219
- if not any(issubclass(r.category, exp_warning) for
220
- exp_warning in self.expected_warning for r in self):
+ if not any(issubclass(r.category, self.expected_warning)
+ for r in self):
221
__tracebackhide__ = True
222
pytest.fail("DID NOT WARN. No warnings of type {0} was emitted. "
223
"The list of emitted warnings is: {1}.".format(
0 commit comments