mirror of
https://github.com/google/bumble.git
synced 2026-06-17 10:02:27 +00:00
use isort when formatting
This commit is contained in:
+18
-17
@@ -18,31 +18,32 @@
|
||||
import asyncio
|
||||
import logging
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
from bumble.controller import Controller
|
||||
from bumble.core import PhysicalTransport
|
||||
from bumble.link import LocalLink
|
||||
from bumble.device import Device
|
||||
from bumble.host import Host
|
||||
from bumble.transport.common import AsyncPipeSink
|
||||
from bumble.avdtp import (
|
||||
AVDTP_IDLE_STATE,
|
||||
AVDTP_STREAMING_STATE,
|
||||
MediaPacketPump,
|
||||
Protocol,
|
||||
Listener,
|
||||
MediaCodecCapabilities,
|
||||
AVDTP_AUDIO_MEDIA_TYPE,
|
||||
AVDTP_TSEP_SNK,
|
||||
A2DP_SBC_CODEC_TYPE,
|
||||
)
|
||||
from bumble.a2dp import (
|
||||
AacMediaCodecInformation,
|
||||
OpusMediaCodecInformation,
|
||||
SbcMediaCodecInformation,
|
||||
)
|
||||
from bumble.avdtp import (
|
||||
A2DP_SBC_CODEC_TYPE,
|
||||
AVDTP_AUDIO_MEDIA_TYPE,
|
||||
AVDTP_IDLE_STATE,
|
||||
AVDTP_STREAMING_STATE,
|
||||
AVDTP_TSEP_SNK,
|
||||
Listener,
|
||||
MediaCodecCapabilities,
|
||||
MediaPacketPump,
|
||||
Protocol,
|
||||
)
|
||||
from bumble.controller import Controller
|
||||
from bumble.core import PhysicalTransport
|
||||
from bumble.device import Device
|
||||
from bumble.host import Host
|
||||
from bumble.link import LocalLink
|
||||
from bumble.rtp import MediaPacket
|
||||
from bumble.transport.common import AsyncPipeSink
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Logging
|
||||
|
||||
+5
-8
@@ -19,25 +19,22 @@ import pytest
|
||||
import pytest_asyncio
|
||||
|
||||
from bumble import device
|
||||
|
||||
from bumble.att import ATT_Error
|
||||
|
||||
from bumble.profiles.aics import (
|
||||
Mute,
|
||||
AICSService,
|
||||
AudioInputState,
|
||||
AICSServiceProxy,
|
||||
AudioInputControlPointOpCode,
|
||||
AudioInputState,
|
||||
AudioInputStatus,
|
||||
ErrorCode,
|
||||
GainMode,
|
||||
GainSettingsProperties,
|
||||
AudioInputStatus,
|
||||
AudioInputControlPointOpCode,
|
||||
ErrorCode,
|
||||
Mute,
|
||||
)
|
||||
from bumble.profiles.vcs import VolumeControlService, VolumeControlServiceProxy
|
||||
|
||||
from .test_utils import TwoDevices
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Tests
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
+2
-1
@@ -13,10 +13,11 @@
|
||||
# limitations under the License.
|
||||
|
||||
import asyncio
|
||||
import pytest
|
||||
import struct
|
||||
from unittest import mock
|
||||
|
||||
import pytest
|
||||
|
||||
from bumble import device as bumble_device
|
||||
from bumble.profiles import asha
|
||||
|
||||
|
||||
+3
-3
@@ -22,11 +22,11 @@ from bumble.avdtp import (
|
||||
AVDTP_GET_CAPABILITIES,
|
||||
AVDTP_MEDIA_TRANSPORT_SERVICE_CATEGORY,
|
||||
AVDTP_SET_CONFIGURATION,
|
||||
Message,
|
||||
Get_Capabilities_Response,
|
||||
Set_Configuration_Command,
|
||||
ServiceCapabilities,
|
||||
MediaCodecCapabilities,
|
||||
Message,
|
||||
ServiceCapabilities,
|
||||
Set_Configuration_Command,
|
||||
)
|
||||
from bumble.rtp import MediaPacket
|
||||
|
||||
|
||||
+1
-8
@@ -20,14 +20,7 @@ import struct
|
||||
|
||||
import pytest
|
||||
|
||||
from bumble import core
|
||||
from bumble import device
|
||||
from bumble import host
|
||||
from bumble import controller
|
||||
from bumble import link
|
||||
from bumble import avc
|
||||
from bumble import avrcp
|
||||
from bumble import avctp
|
||||
from bumble import avc, avctp, avrcp, controller, core, device, host, link
|
||||
from bumble.transport import common
|
||||
|
||||
|
||||
|
||||
+11
-11
@@ -17,46 +17,46 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
import asyncio
|
||||
import functools
|
||||
import pytest
|
||||
import logging
|
||||
|
||||
import pytest
|
||||
|
||||
from bumble import device
|
||||
from bumble.hci import CodecID, CodingFormat
|
||||
from bumble.profiles.ascs import (
|
||||
AudioStreamControlService,
|
||||
AudioStreamControlServiceProxy,
|
||||
AseStateMachine,
|
||||
ASE_Operation,
|
||||
ASE_Config_Codec,
|
||||
ASE_Config_QOS,
|
||||
ASE_Disable,
|
||||
ASE_Enable,
|
||||
ASE_Operation,
|
||||
ASE_Receiver_Start_Ready,
|
||||
ASE_Receiver_Stop_Ready,
|
||||
ASE_Release,
|
||||
ASE_Update_Metadata,
|
||||
AseStateMachine,
|
||||
AudioStreamControlService,
|
||||
AudioStreamControlServiceProxy,
|
||||
)
|
||||
from bumble.profiles.bap import (
|
||||
AudioLocation,
|
||||
BasicAudioAnnouncement,
|
||||
BroadcastAudioAnnouncement,
|
||||
SupportedFrameDuration,
|
||||
SupportedSamplingFrequency,
|
||||
SamplingFrequency,
|
||||
FrameDuration,
|
||||
CodecSpecificCapabilities,
|
||||
CodecSpecificConfiguration,
|
||||
ContextType,
|
||||
FrameDuration,
|
||||
SamplingFrequency,
|
||||
SupportedFrameDuration,
|
||||
SupportedSamplingFrequency,
|
||||
)
|
||||
from bumble.profiles.le_audio import Metadata
|
||||
from bumble.profiles.pacs import (
|
||||
PacRecord,
|
||||
PublishedAudioCapabilitiesService,
|
||||
PublishedAudioCapabilitiesServiceProxy,
|
||||
)
|
||||
from bumble.profiles.le_audio import Metadata
|
||||
from tests.test_utils import TwoDevices, async_barrier
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Logging
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
+1
-2
@@ -16,13 +16,12 @@
|
||||
# Imports
|
||||
# -----------------------------------------------------------------------------
|
||||
import asyncio
|
||||
import os
|
||||
import logging
|
||||
import os
|
||||
|
||||
from bumble import hci
|
||||
from bumble.profiles import bass
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Logging
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
+6
-6
@@ -16,14 +16,14 @@
|
||||
# Imports
|
||||
# -----------------------------------------------------------------------------
|
||||
import asyncio
|
||||
import os
|
||||
import pytest
|
||||
import logging
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
from bumble import device, gatt
|
||||
from bumble.profiles import cap, csip
|
||||
|
||||
from bumble import device
|
||||
from bumble import gatt
|
||||
from bumble.profiles import cap
|
||||
from bumble.profiles import csip
|
||||
from .test_utils import TwoDevices
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
@@ -16,7 +16,9 @@
|
||||
# Imports
|
||||
# -----------------------------------------------------------------------------
|
||||
import random
|
||||
|
||||
import pytest
|
||||
|
||||
from bumble.codecs import AacAudioRtpPacket, BitReader, BitWriter
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@
|
||||
# Imports
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
from bumble.core import AdvertisingData, Appearance, UUID, get_dict_key_by_value
|
||||
from bumble.core import UUID, AdvertisingData, Appearance, get_dict_key_by_value
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
+5
-3
@@ -16,14 +16,16 @@
|
||||
# Imports
|
||||
# -----------------------------------------------------------------------------
|
||||
import asyncio
|
||||
import os
|
||||
import pytest
|
||||
import struct
|
||||
import logging
|
||||
import os
|
||||
import struct
|
||||
from unittest import mock
|
||||
|
||||
import pytest
|
||||
|
||||
from bumble import device
|
||||
from bumble.profiles import csip
|
||||
|
||||
from .test_utils import TwoDevices
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
import hashlib
|
||||
import os
|
||||
|
||||
from bumble.decoder import G722Decoder
|
||||
|
||||
|
||||
|
||||
+7
-12
@@ -20,12 +20,11 @@ import functools
|
||||
import logging
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import pytest
|
||||
|
||||
from bumble.core import (
|
||||
PhysicalTransport,
|
||||
ConnectionParameters,
|
||||
)
|
||||
from bumble import device, gatt, hci, utils
|
||||
from bumble.core import ConnectionParameters, PhysicalTransport
|
||||
from bumble.device import (
|
||||
AdvertisingEventProperties,
|
||||
AdvertisingParameters,
|
||||
@@ -35,27 +34,23 @@ from bumble.device import (
|
||||
Device,
|
||||
PeriodicAdvertisingParameters,
|
||||
)
|
||||
from bumble.host import DataPacketQueue, Host
|
||||
from bumble import device
|
||||
from bumble import hci
|
||||
from bumble.hci import (
|
||||
HCI_ACCEPT_CONNECTION_REQUEST_COMMAND,
|
||||
HCI_COMMAND_STATUS_PENDING,
|
||||
HCI_CONNECTION_FAILED_TO_BE_ESTABLISHED_ERROR,
|
||||
HCI_CREATE_CONNECTION_COMMAND,
|
||||
HCI_SUCCESS,
|
||||
HCI_CONNECTION_FAILED_TO_BE_ESTABLISHED_ERROR,
|
||||
Address,
|
||||
OwnAddressType,
|
||||
Role,
|
||||
HCI_Command_Complete_Event,
|
||||
HCI_Command_Status_Event,
|
||||
HCI_Connection_Complete_Event,
|
||||
HCI_Connection_Request_Event,
|
||||
HCI_Error,
|
||||
HCI_Packet,
|
||||
OwnAddressType,
|
||||
Role,
|
||||
)
|
||||
from bumble import utils
|
||||
from bumble import gatt
|
||||
from bumble.host import DataPacketQueue, Host
|
||||
|
||||
from .test_utils import TwoDevices, async_barrier
|
||||
|
||||
|
||||
@@ -16,14 +16,14 @@
|
||||
# Imports
|
||||
# -----------------------------------------------------------------------------
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
|
||||
from . import test_utils
|
||||
|
||||
from bumble import device
|
||||
from bumble import gatt
|
||||
from bumble import device, gatt
|
||||
from bumble.profiles import gatt_service
|
||||
|
||||
from . import test_utils
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
@pytest.mark.asyncio
|
||||
|
||||
+38
-35
@@ -16,56 +16,59 @@
|
||||
# Imports
|
||||
# -----------------------------------------------------------------------------
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import enum
|
||||
import logging
|
||||
import os
|
||||
import struct
|
||||
import pytest
|
||||
from typing import Any
|
||||
from typing_extensions import Self
|
||||
from unittest.mock import AsyncMock, Mock, ANY
|
||||
from unittest.mock import ANY, AsyncMock, Mock
|
||||
|
||||
import pytest
|
||||
from typing_extensions import Self
|
||||
|
||||
from bumble.controller import Controller
|
||||
from bumble.link import LocalLink
|
||||
from bumble.device import Device, Peer
|
||||
from bumble.host import Host
|
||||
from bumble.gatt import (
|
||||
GATT_BATTERY_LEVEL_CHARACTERISTIC,
|
||||
GATT_CLIENT_CHARACTERISTIC_CONFIGURATION_DESCRIPTOR,
|
||||
Service,
|
||||
Characteristic,
|
||||
CharacteristicValue,
|
||||
Descriptor,
|
||||
)
|
||||
from bumble.gatt_client import CharacteristicProxy
|
||||
from bumble.gatt_adapters import (
|
||||
CharacteristicProxyAdapter,
|
||||
SerializableCharacteristicAdapter,
|
||||
SerializableCharacteristicProxyAdapter,
|
||||
DelegatedCharacteristicAdapter,
|
||||
DelegatedCharacteristicProxyAdapter,
|
||||
PackedCharacteristicAdapter,
|
||||
PackedCharacteristicProxyAdapter,
|
||||
MappedCharacteristicAdapter,
|
||||
MappedCharacteristicProxyAdapter,
|
||||
UTF8CharacteristicAdapter,
|
||||
UTF8CharacteristicProxyAdapter,
|
||||
EnumCharacteristicAdapter,
|
||||
EnumCharacteristicProxyAdapter,
|
||||
)
|
||||
from bumble.transport.common import AsyncPipeSink
|
||||
from bumble.core import UUID
|
||||
from bumble.att import (
|
||||
Attribute,
|
||||
Opcode,
|
||||
ATT_ATTRIBUTE_NOT_FOUND_ERROR,
|
||||
ATT_PDU,
|
||||
ATT_Error,
|
||||
ATT_Error_Response,
|
||||
ATT_Read_By_Group_Type_Request,
|
||||
Attribute,
|
||||
ErrorCode,
|
||||
Opcode,
|
||||
)
|
||||
from bumble.controller import Controller
|
||||
from bumble.core import UUID
|
||||
from bumble.device import Device, Peer
|
||||
from bumble.gatt import (
|
||||
GATT_BATTERY_LEVEL_CHARACTERISTIC,
|
||||
GATT_CLIENT_CHARACTERISTIC_CONFIGURATION_DESCRIPTOR,
|
||||
Characteristic,
|
||||
CharacteristicValue,
|
||||
Descriptor,
|
||||
Service,
|
||||
)
|
||||
from bumble.gatt_adapters import (
|
||||
CharacteristicProxyAdapter,
|
||||
DelegatedCharacteristicAdapter,
|
||||
DelegatedCharacteristicProxyAdapter,
|
||||
EnumCharacteristicAdapter,
|
||||
EnumCharacteristicProxyAdapter,
|
||||
MappedCharacteristicAdapter,
|
||||
MappedCharacteristicProxyAdapter,
|
||||
PackedCharacteristicAdapter,
|
||||
PackedCharacteristicProxyAdapter,
|
||||
SerializableCharacteristicAdapter,
|
||||
SerializableCharacteristicProxyAdapter,
|
||||
UTF8CharacteristicAdapter,
|
||||
UTF8CharacteristicProxyAdapter,
|
||||
)
|
||||
from bumble.gatt_client import CharacteristicProxy
|
||||
from bumble.host import Host
|
||||
from bumble.link import LocalLink
|
||||
from bumble.transport.common import AsyncPipeSink
|
||||
|
||||
from .test_utils import async_barrier
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -21,13 +21,13 @@ import pytest_asyncio
|
||||
|
||||
from bumble import device
|
||||
from bumble.profiles.gmap import (
|
||||
BgrFeatures,
|
||||
BgsFeatures,
|
||||
GamingAudioService,
|
||||
GamingAudioServiceProxy,
|
||||
GmapRole,
|
||||
UggFeatures,
|
||||
UgtFeatures,
|
||||
BgrFeatures,
|
||||
BgsFeatures,
|
||||
)
|
||||
|
||||
from .test_utils import TwoDevices
|
||||
|
||||
+6
-4
@@ -16,15 +16,17 @@
|
||||
# Imports
|
||||
# -----------------------------------------------------------------------------
|
||||
import asyncio
|
||||
import pytest
|
||||
import pytest_asyncio
|
||||
import logging
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
import pytest_asyncio
|
||||
|
||||
from bumble import att, device
|
||||
from bumble.profiles import hap
|
||||
from .test_utils import TwoDevices
|
||||
from bumble.keys import PairingKeys
|
||||
from bumble.profiles import hap
|
||||
|
||||
from .test_utils import TwoDevices
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Logging
|
||||
|
||||
@@ -22,7 +22,6 @@ import pytest
|
||||
|
||||
from bumble import hci
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# pylint: disable=invalid-name
|
||||
|
||||
|
||||
+3
-6
@@ -18,17 +18,14 @@
|
||||
import asyncio
|
||||
import logging
|
||||
import os
|
||||
from typing import Optional
|
||||
|
||||
import pytest
|
||||
import pytest_asyncio
|
||||
|
||||
from typing import Optional
|
||||
from bumble import core, hci, hfp, rfcomm
|
||||
|
||||
from .test_utils import TwoDevices
|
||||
from bumble import core
|
||||
from bumble import hfp
|
||||
from bumble import rfcomm
|
||||
from bumble import hci
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Logging
|
||||
|
||||
+5
-4
@@ -16,14 +16,15 @@
|
||||
# Imports
|
||||
# -----------------------------------------------------------------------------
|
||||
import logging
|
||||
import unittest.mock
|
||||
import pytest
|
||||
import unittest
|
||||
import unittest.mock
|
||||
|
||||
import pytest
|
||||
|
||||
from bumble.controller import Controller
|
||||
from bumble.host import Host, DataPacketQueue
|
||||
from bumble.transport.common import AsyncPipeSink
|
||||
from bumble.hci import HCI_AclDataPacket
|
||||
from bumble.host import DataPacketQueue, Host
|
||||
from bumble.transport.common import AsyncPipeSink
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Logging
|
||||
|
||||
@@ -39,7 +39,6 @@ def test_import():
|
||||
transport,
|
||||
utils,
|
||||
)
|
||||
|
||||
from bumble.profiles import (
|
||||
ascs,
|
||||
bap,
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
import asyncio
|
||||
import json
|
||||
import logging
|
||||
import pathlib
|
||||
import pytest
|
||||
import tempfile
|
||||
import os
|
||||
import pathlib
|
||||
import tempfile
|
||||
|
||||
import pytest
|
||||
|
||||
from bumble.keys import JsonKeyStore, PairingKeys
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Logging
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
+3
-2
@@ -19,12 +19,13 @@ import asyncio
|
||||
import logging
|
||||
import os
|
||||
import random
|
||||
|
||||
import pytest
|
||||
|
||||
from bumble.core import ProtocolError
|
||||
from bumble import l2cap
|
||||
from .test_utils import TwoDevices, async_barrier
|
||||
from bumble.core import ProtocolError
|
||||
|
||||
from .test_utils import TwoDevices, async_barrier
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Logging
|
||||
|
||||
+3
-3
@@ -17,16 +17,16 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
import asyncio
|
||||
import dataclasses
|
||||
import logging
|
||||
import struct
|
||||
|
||||
import pytest
|
||||
import pytest_asyncio
|
||||
import struct
|
||||
import logging
|
||||
|
||||
from bumble import device
|
||||
from bumble.profiles import mcp
|
||||
from tests.test_utils import TwoDevices
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Logging
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
@@ -16,21 +16,23 @@
|
||||
# Imports
|
||||
# -----------------------------------------------------------------------------
|
||||
import asyncio
|
||||
|
||||
import pytest
|
||||
|
||||
from . import test_utils
|
||||
from bumble import core
|
||||
from bumble.rfcomm import (
|
||||
DLC,
|
||||
RFCOMM_PSM,
|
||||
Client,
|
||||
RFCOMM_Frame,
|
||||
Server,
|
||||
Client,
|
||||
DLC,
|
||||
make_service_sdp_records,
|
||||
find_rfcomm_channels,
|
||||
find_rfcomm_channel_with_uuid,
|
||||
RFCOMM_PSM,
|
||||
find_rfcomm_channels,
|
||||
make_service_sdp_records,
|
||||
)
|
||||
|
||||
from . import test_utils
|
||||
|
||||
_TIMEOUT = 0.1
|
||||
|
||||
|
||||
|
||||
+8
-6
@@ -18,19 +18,21 @@
|
||||
import asyncio
|
||||
import logging
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
from bumble.core import UUID, BT_L2CAP_PROTOCOL_ID
|
||||
from bumble.core import BT_L2CAP_PROTOCOL_ID, UUID
|
||||
from bumble.sdp import (
|
||||
DataElement,
|
||||
ServiceAttribute,
|
||||
Client,
|
||||
SDP_SERVICE_RECORD_HANDLE_ATTRIBUTE_ID,
|
||||
SDP_BROWSE_GROUP_LIST_ATTRIBUTE_ID,
|
||||
SDP_PROTOCOL_DESCRIPTOR_LIST_ATTRIBUTE_ID,
|
||||
SDP_PUBLIC_BROWSE_ROOT,
|
||||
SDP_SERVICE_CLASS_ID_LIST_ATTRIBUTE_ID,
|
||||
SDP_PROTOCOL_DESCRIPTOR_LIST_ATTRIBUTE_ID,
|
||||
SDP_SERVICE_RECORD_HANDLE_ATTRIBUTE_ID,
|
||||
Client,
|
||||
DataElement,
|
||||
ServiceAttribute,
|
||||
)
|
||||
|
||||
from .test_utils import TwoDevices
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
+6
-8
@@ -19,26 +19,24 @@ import asyncio
|
||||
import itertools
|
||||
import logging
|
||||
import os
|
||||
import pytest
|
||||
|
||||
from unittest.mock import AsyncMock, MagicMock, patch
|
||||
|
||||
from bumble.core import PhysicalTransport
|
||||
import pytest
|
||||
|
||||
from bumble.core import PhysicalTransport, ProtocolError
|
||||
from bumble.device import Peer
|
||||
from bumble.gatt import Service, Characteristic
|
||||
from bumble.gatt import Characteristic, Service
|
||||
from bumble.hci import Role
|
||||
from bumble.pairing import PairingConfig, PairingDelegate
|
||||
from bumble.smp import (
|
||||
SMP_PAIRING_NOT_SUPPORTED_ERROR,
|
||||
SMP_CONFIRM_VALUE_FAILED_ERROR,
|
||||
SMP_PAIRING_NOT_SUPPORTED_ERROR,
|
||||
OobContext,
|
||||
OobLegacyContext,
|
||||
)
|
||||
from bumble.core import ProtocolError
|
||||
from bumble.hci import Role
|
||||
|
||||
from .test_utils import TwoDevices
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Logging
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
+8
-10
@@ -16,19 +16,17 @@
|
||||
# Imports
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
import pytest
|
||||
from typing import Any, Optional
|
||||
from unittest import mock
|
||||
|
||||
from bumble import smp
|
||||
from bumble import pairing
|
||||
from bumble import crypto
|
||||
from bumble.crypto import EccKey, aes_cmac, ah, c1, f4, f5, f6, g2, h6, h7, s1
|
||||
from bumble.pairing import OobData, OobSharedData, LeRole
|
||||
from bumble.hci import Address
|
||||
from bumble.core import AdvertisingData
|
||||
from bumble.device import Device
|
||||
import pytest
|
||||
|
||||
from typing import Optional, Any
|
||||
from bumble import crypto, pairing, smp
|
||||
from bumble.core import AdvertisingData
|
||||
from bumble.crypto import EccKey, aes_cmac, ah, c1, f4, f5, f6, g2, h6, h7, s1
|
||||
from bumble.device import Device
|
||||
from bumble.hci import Address
|
||||
from bumble.pairing import LeRole, OobData, OobSharedData
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
+5
-4
@@ -17,15 +17,16 @@
|
||||
# -----------------------------------------------------------------------------
|
||||
import asyncio
|
||||
from typing import Optional
|
||||
|
||||
from typing_extensions import Self
|
||||
|
||||
from bumble.controller import Controller
|
||||
from bumble.link import LocalLink
|
||||
from bumble.device import Device, Connection
|
||||
from bumble.host import Host
|
||||
from bumble.transport.common import AsyncPipeSink
|
||||
from bumble.device import Connection, Device
|
||||
from bumble.hci import Address
|
||||
from bumble.host import Host
|
||||
from bumble.keys import PairingKeys
|
||||
from bumble.link import LocalLink
|
||||
from bumble.transport.common import AsyncPipeSink
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
@@ -14,10 +14,11 @@
|
||||
|
||||
import asyncio
|
||||
import os
|
||||
import pytest
|
||||
import socket
|
||||
from unittest import mock
|
||||
|
||||
import pytest
|
||||
|
||||
from bumble.transport.tcp_server import (
|
||||
open_tcp_server_transport,
|
||||
open_tcp_server_transport_with_socket,
|
||||
|
||||
@@ -12,21 +12,18 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import os
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Imports
|
||||
# -----------------------------------------------------------------------------
|
||||
import random
|
||||
import os
|
||||
import socket
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
from bumble import controller
|
||||
from bumble import device
|
||||
from bumble import hci
|
||||
from bumble import link
|
||||
from bumble import transport
|
||||
from bumble import controller, device, hci, link, transport
|
||||
from bumble.transport.common import PacketParser
|
||||
|
||||
|
||||
|
||||
+3
-1
@@ -12,15 +12,17 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import logging
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Imports
|
||||
# -----------------------------------------------------------------------------
|
||||
import pytest
|
||||
import pytest_asyncio
|
||||
import logging
|
||||
|
||||
from bumble import device
|
||||
from bumble.profiles import vcs
|
||||
|
||||
from .test_utils import TwoDevices
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
+7
-9
@@ -13,32 +13,30 @@
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
import struct
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Imports
|
||||
# -----------------------------------------------------------------------------
|
||||
import pytest
|
||||
import pytest_asyncio
|
||||
import struct
|
||||
|
||||
from bumble import device
|
||||
|
||||
from bumble.att import ATT_Error
|
||||
|
||||
from bumble.profiles.bap import AudioLocation
|
||||
from bumble.profiles.vcs import VolumeControlService, VolumeControlServiceProxy
|
||||
from bumble.profiles.vocs import (
|
||||
VolumeOffsetControlService,
|
||||
ErrorCode,
|
||||
MIN_VOLUME_OFFSET,
|
||||
MAX_VOLUME_OFFSET,
|
||||
MIN_VOLUME_OFFSET,
|
||||
ErrorCode,
|
||||
SetVolumeOffsetOpCode,
|
||||
VolumeOffsetControlService,
|
||||
VolumeOffsetControlServiceProxy,
|
||||
VolumeOffsetState,
|
||||
)
|
||||
from bumble.profiles.vcs import VolumeControlService, VolumeControlServiceProxy
|
||||
from bumble.profiles.bap import AudioLocation
|
||||
|
||||
from .test_utils import TwoDevices
|
||||
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# Tests
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user