diff --git a/src/_pytest/recwarn.py b/src/_pytest/recwarn.py index 8768f08d3c3..29b8318f7ac 100644 --- a/src/_pytest/recwarn.py +++ b/src/_pytest/recwarn.py @@ -290,7 +290,7 @@ def found_str(): else: fail( f"""\ -DID NOT WARN. No warnings of type {self.expected_warning} matching the regex was emitted. +DID NOT WARN. No warnings of type {self.expected_warning} matching the regex were emitted. The regex is: {self.match_expr!r} The list of emitted warnings is: {found_str()}""" )