From b0e330d5cd34375b72d9b2b2c557293d0a7e5cd6 Mon Sep 17 00:00:00 2001 From: "Peter A. Jonsson" Date: Tue, 21 Jul 2026 21:09:58 +0200 Subject: [PATCH] test_warnings.py: fix SyntaxWarnings Add the missing r-qualifier on the strings to fix the two warnings about invalid escape sequences. --- tests/internal/test_warnings.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/internal/test_warnings.py b/tests/internal/test_warnings.py index 9ce955b74..96ec96b40 100644 --- a/tests/internal/test_warnings.py +++ b/tests/internal/test_warnings.py @@ -102,8 +102,8 @@ def add(cls, x, y): expected_warning = ( r"Call to deprecated .*(method|function).* do_plus\." - " \(Usage of this legacy .*(method|function).* is deprecated\. Use `\.add` instead\.\)" - " -- Deprecated since version v1\.2\." + r" \(Usage of this legacy .*(method|function).* is deprecated\. Use `\.add` instead\.\)" + r" -- Deprecated since version v1\.2\." ) with pytest.warns(UserDeprecationWarning, match=expected_warning):