Skip to content

Commit dd8ad3f

Browse files
committed
Split warns matching string in multiple lines
1 parent 2414d23 commit dd8ad3f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

testing/deprecated_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,10 @@ def test_hookproxy_warnings_for_fspath(tmp_path, hooktype, request):
183183
def test_warns_none_is_deprecated():
184184
with pytest.warns(
185185
PytestDeprecationWarning,
186-
match=r"Passing None to catch any warning has been deprecated, pass no arguments instead:\n Replace pytest.warns\(None\) by simply pytest.warns\(\).",
186+
match=re.escape(
187+
"Passing None to catch any warning has been deprecated, pass no arguments instead:\n "
188+
"Replace pytest.warns(None) by simply pytest.warns()."
189+
),
187190
):
188191
with pytest.warns(None):
189192
pass

0 commit comments

Comments
 (0)