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.
This commit is contained in:
David Lechner
2026-04-26 09:31:18 -05:00
parent 27d02ef18d
commit a91ea9110c

View File

@@ -215,7 +215,7 @@ def test_pdu_parameter_length(caplog) -> None:
transaction_id=0, error_code=sdp.ErrorCode.INVALID_SDP_VERSION transaction_id=0, error_code=sdp.ErrorCode.INVALID_SDP_VERSION
) )
assert sdp.SDP_PDU.from_bytes(bytes(pdu)) == pdu 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)
# ----------------------------------------------------------------------------- # -----------------------------------------------------------------------------