Skip to content

Commit 5bee3f5

Browse files
committed
chore: small changes to comments
1 parent b2197d9 commit 5bee3f5

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

roborock/devices/traits/a01/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@
7171
}
7272

7373
ZEO_PROTOCOL_ENTRIES: dict[RoborockZeoProtocol, Callable] = {
74-
# ro
74+
# read-only
7575
RoborockZeoProtocol.STATE: lambda val: ZeoState(val).name,
7676
RoborockZeoProtocol.COUNTDOWN: lambda val: int(val),
7777
RoborockZeoProtocol.WASHING_LEFT: lambda val: int(val),
7878
RoborockZeoProtocol.ERROR: lambda val: ZeoError(val).name,
7979
RoborockZeoProtocol.TIMES_AFTER_CLEAN: lambda val: int(val),
8080
RoborockZeoProtocol.DETERGENT_EMPTY: lambda val: bool(val),
8181
RoborockZeoProtocol.SOFTENER_EMPTY: lambda val: bool(val),
82-
# rw
82+
# read-write
8383
RoborockZeoProtocol.MODE: lambda val: ZeoMode(val).name,
8484
RoborockZeoProtocol.PROGRAM: lambda val: ZeoProgram(val).name,
8585
RoborockZeoProtocol.TEMP: lambda val: ZeoTemperature(val).name,

tests/devices/test_a01_traits.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,11 @@ def mock_channel():
1212
channel.send_command = AsyncMock()
1313
# Mocking send_decoded_command if it was a method on channel, but it's a standalone function imported in traits.
1414
# However, in traits/__init__.py it is imported as: from roborock.devices.a01_channel import send_decoded_command
15-
# Implementation detail: we need to mock send_decoded_command where it is used.
1615
return channel
1716

1817

19-
@pytest.fixture
20-
def mock_send_decoded_command():
21-
with patch("roborock.devices.traits.a01.send_decoded_command", new_callable=AsyncMock) as mock:
22-
yield mock
23-
24-
2518
@pytest.mark.asyncio
2619
async def test_dyad_query_values(mock_channel):
27-
# We need to patch send_decoded_command in the module under test
2820
with patch("roborock.devices.traits.a01.send_decoded_command", new_callable=AsyncMock) as mock_send:
2921
api = DyadApi(mock_channel)
3022

0 commit comments

Comments
 (0)