mirror of
https://github.com/python-kasa/python-kasa.git
synced 2025-08-09 20:24:02 +00:00
Drop python3.8 support (#992)
Drop support for soon-to-be eol'd python 3.8. This will allow some minor cleanups & makes it easier to add support for timezones. Related to https://github.com/python-kasa/python-kasa/issues/980#issuecomment-2170889543
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import AsyncGenerator
|
||||
from collections.abc import AsyncGenerator
|
||||
|
||||
import pytest
|
||||
|
||||
|
@@ -91,9 +91,10 @@ async def test_state_info(dev):
|
||||
@pytest.mark.requires_dummy
|
||||
@device_iot
|
||||
async def test_invalid_connection(mocker, dev):
|
||||
with mocker.patch.object(
|
||||
FakeIotProtocol, "query", side_effect=KasaException
|
||||
), pytest.raises(KasaException):
|
||||
with (
|
||||
mocker.patch.object(FakeIotProtocol, "query", side_effect=KasaException),
|
||||
pytest.raises(KasaException),
|
||||
):
|
||||
await dev.update()
|
||||
|
||||
|
||||
|
@@ -38,9 +38,10 @@ async def test_update_no_device_info(dev: SmartDevice, mocker: MockerFixture):
|
||||
"get_device_time": {},
|
||||
}
|
||||
msg = f"get_device_info not found in {mock_response} for device 127.0.0.123"
|
||||
with mocker.patch.object(
|
||||
dev.protocol, "query", return_value=mock_response
|
||||
), pytest.raises(KasaException, match=msg):
|
||||
with (
|
||||
mocker.patch.object(dev.protocol, "query", return_value=mock_response),
|
||||
pytest.raises(KasaException, match=msg),
|
||||
):
|
||||
await dev.update()
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user