Merge de96d738eb
into ac41898755
This commit is contained in:
commit
a8770bcc97
|
@ -1917,6 +1917,13 @@ def parse_warning_filter(
|
||||||
raise UsageError(error_template.format(error=exception_text)) from None
|
raise UsageError(error_template.format(error=exception_text)) from None
|
||||||
if message and escape:
|
if message and escape:
|
||||||
message = re.escape(message)
|
message = re.escape(message)
|
||||||
|
if "()" in message:
|
||||||
|
warning = dedent(
|
||||||
|
"""
|
||||||
|
An empty group '()' will not match a string that contains literal parenthesis
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
warnings.warn(PytestConfigWarning(warning))
|
||||||
if module and escape:
|
if module and escape:
|
||||||
module = re.escape(module) + r"\Z"
|
module = re.escape(module) + r"\Z"
|
||||||
if lineno_:
|
if lineno_:
|
||||||
|
|
Loading…
Reference in New Issue