We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6df19b4 commit 83535ceCopy full SHA for 83535ce
src/_pytest/recwarn.py
@@ -284,7 +284,7 @@ def __init__(
284
285
def matches(self, warning: warnings.WarningMessage) -> bool:
286
assert self.expected_warning is not None
287
- return issubclass(warning.category, self.expected_warning) and (
+ return issubclass(warning.category, self.expected_warning) and bool(
288
self.match_expr is None or re.search(self.match_expr, str(warning.message))
289
)
290
0 commit comments