Split warns matching string in multiple lines
This commit is contained in:
parent
2414d23c78
commit
dd8ad3fa9c
|
@ -183,7 +183,10 @@ def test_hookproxy_warnings_for_fspath(tmp_path, hooktype, request):
|
|||
def test_warns_none_is_deprecated():
|
||||
with pytest.warns(
|
||||
PytestDeprecationWarning,
|
||||
match=r"Passing None to catch any warning has been deprecated, pass no arguments instead:\n Replace pytest.warns\(None\) by simply pytest.warns\(\).",
|
||||
match=re.escape(
|
||||
"Passing None to catch any warning has been deprecated, pass no arguments instead:\n "
|
||||
"Replace pytest.warns(None) by simply pytest.warns()."
|
||||
),
|
||||
):
|
||||
with pytest.warns(None):
|
||||
pass
|
||||
|
|
Loading…
Reference in New Issue