mirror of
https://github.com/google/bumble.git
synced 2026-05-08 03:58:01 +00:00
sdp: address review nits (import at top, InvalidPacketError)
- bumble/sdp.py: replace raise ValueError with raise InvalidPacketError in DataElement.list_from_bytes depth guard. InvalidPacketError already imported at line 34 and extends ValueError so the existing regression test continues to match. - tests/sdp_test.py: remove duplicate 'import pytest' inside test_nested_sequence_recursion_guard; pytest already imported at module top (line 23). Threading.local counter left as-is per zxzxwu's 'leave it here and refactor later' comment on the PR.
This commit is contained in:
@@ -461,8 +461,6 @@ def test_nested_sequence_recursion_guard():
|
||||
break
|
||||
inner = bytes([0x36, (size >> 8) & 0xFF, size & 0xFF]) + inner
|
||||
|
||||
import pytest
|
||||
|
||||
with pytest.raises(ValueError, match="nesting exceeds max depth"):
|
||||
DataElement.from_bytes(inner)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user