Skip to content

Commit 3512be5

Browse files
committed
chore: Update pydoc and formatting
1 parent 21a9e5b commit 3512be5

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

tests/devices/test_device_manager.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Tests for the DeviceManager class."""
22

3-
import datetime
43
import asyncio
4+
import datetime
55
from collections.abc import Generator, Iterator
66
from unittest.mock import AsyncMock, Mock, patch
77

@@ -38,19 +38,20 @@ def channel_fixture() -> Generator[Mock, None, None]:
3838

3939
@pytest.fixture(autouse=True)
4040
def mock_sleep() -> Generator[Mock, None, None]:
41-
"""Mock asyncio.sleep in device module to speed up tests."""
41+
"""Mock sleep logic to speed up tests."""
4242
sleep_time = datetime.timedelta(seconds=0.001)
43-
with patch("roborock.devices.device.MIN_BACKOFF_INTERVAL", sleep_time), patch("roborock.devices.device.MAX_BACKOFF_INTERVAL", sleep_time):
43+
with (
44+
patch("roborock.devices.device.MIN_BACKOFF_INTERVAL", sleep_time),
45+
patch("roborock.devices.device.MAX_BACKOFF_INTERVAL", sleep_time),
46+
):
4447
yield
4548

4649

4750
@pytest.fixture(name="channel_failure")
4851
def channel_failure_fixture() -> Generator[Mock, None, None]:
4952
"""Fixture that makes channel subscribe fail."""
5053
with patch("roborock.devices.device_manager.create_v1_channel") as mock_channel:
51-
mock_channel.return_value.subscribe = AsyncMock(
52-
side_effect=RoborockException("Connection failed")
53-
)
54+
mock_channel.return_value.subscribe = AsyncMock(side_effect=RoborockException("Connection failed"))
5455
mock_channel.return_value.is_connected = False
5556
yield mock_channel
5657

0 commit comments

Comments
 (0)