Skip to content

Commit

Permalink
update websockets version (for better typecheck)
Browse files Browse the repository at this point in the history
  • Loading branch information
barbibulle committed Feb 5, 2024
1 parent a877283 commit d7489a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ install_requires =
pyserial-asyncio >= 0.5; platform_system!='Emscripten'
pyserial >= 3.5; platform_system!='Emscripten'
pyusb >= 1.2; platform_system!='Emscripten'
websockets >= 8.1; platform_system!='Emscripten'
websockets >= 12.0; platform_system!='Emscripten'

[options.entry_points]
console_scripts =
Expand Down
6 changes: 4 additions & 2 deletions tests/rfcomm_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
# -----------------------------------------------------------------------------
import asyncio
import pytest
from typing import List

from . import test_utils
from bumble import core
Expand Down Expand Up @@ -59,17 +60,18 @@ def test_frames():

# -----------------------------------------------------------------------------
@pytest.mark.asyncio
async def test_basic_connection():
async def test_basic_connection() -> None:
devices = test_utils.TwoDevices()
await devices.setup_connection()

accept_future: asyncio.Future[DLC] = asyncio.get_running_loop().create_future()
channel = Server(devices[0]).listen(acceptor=accept_future.set_result)

assert devices.connections[1]
multiplexer = await Client(devices.connections[1]).start()
dlcs = await asyncio.gather(accept_future, multiplexer.open_dlc(channel))

queues = [asyncio.Queue(), asyncio.Queue()]
queues: List[asyncio.Queue] = [asyncio.Queue(), asyncio.Queue()]
for dlc, queue in zip(dlcs, queues):
dlc.sink = queue.put_nowait

Expand Down

0 comments on commit d7489a6

Please sign in to comment.