Skip to content

Commit 2cfd3f5

Browse files
committed
Update relevant test-asserts
1 parent b03c510 commit 2cfd3f5

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

tests/test_usb.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -355,12 +355,9 @@ async def test_stick_connect_without_port(self) -> None:
355355
stick = pw_stick.Stick()
356356
assert stick.nodes == {}
357357
assert stick.joined_nodes is None
358-
with pytest.raises(pw_exceptions.StickError):
359-
stick.mac_stick
360-
with pytest.raises(pw_exceptions.StickError):
361-
stick.mac_coordinator
362-
with pytest.raises(pw_exceptions.StickError):
363-
stick.network_id
358+
assert stick.mac_stick is None
359+
assert stick.mac_coordinator is None
360+
assert stick.network_id is None
364361
assert not stick.network_discovered
365362
assert not stick.network_state
366363

@@ -477,8 +474,6 @@ async def test_stick_connect(self, monkeypatch: pytest.MonkeyPatch) -> None:
477474
unsub_connect()
478475
await stick.disconnect()
479476
assert not stick.network_state
480-
# with pytest.raises(pw_exceptions.StickError):
481-
# stick.mac_stick
482477

483478
async def disconnected(self, event: pw_api.StickEvent) -> None: # type: ignore[name-defined]
484479
"""Handle disconnect event callback."""

0 commit comments

Comments
 (0)