From a91ea9110cd048b1d4219d5c5deaf7e538b6b7e3 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Sun, 26 Apr 2026 09:31:18 -0500 Subject: [PATCH] Fix regex syntax warning in sdp_test.py. Change regex match string to raw string to avoid syntax warning: tests/sdp_test.py:218: SyntaxWarning: invalid escape sequence '\d' assert not re.search("Expect \d+ bytes, got \d+", caplog.text) In the future, this will become an error, so we should fix it now. --- tests/sdp_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sdp_test.py b/tests/sdp_test.py index 31c569a..6e05c4c 100644 --- a/tests/sdp_test.py +++ b/tests/sdp_test.py @@ -215,7 +215,7 @@ def test_pdu_parameter_length(caplog) -> None: transaction_id=0, error_code=sdp.ErrorCode.INVALID_SDP_VERSION ) assert sdp.SDP_PDU.from_bytes(bytes(pdu)) == pdu - assert not re.search("Expect \d+ bytes, got \d+", caplog.text) + assert not re.search(r"Expect \d+ bytes, got \d+", caplog.text) # -----------------------------------------------------------------------------