mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 21:27:38 +00:00
Disable failing dsmr tests (#31202)
* Disable failing dsmr tests * Disable module, disable import of missing dep
This commit is contained in:
parent
52c1bc9c26
commit
050e4afdc0
@ -14,10 +14,16 @@ import asynctest
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from homeassistant.bootstrap import async_setup_component
|
from homeassistant.bootstrap import async_setup_component
|
||||||
from homeassistant.components.dsmr.sensor import DerivativeDSMREntity
|
|
||||||
|
|
||||||
from tests.common import assert_setup_component
|
from tests.common import assert_setup_component
|
||||||
|
|
||||||
|
# Imports disabled due to missing PyCRC on PyPi
|
||||||
|
# Also disabled pylint/flake8 where this is used below
|
||||||
|
# from homeassistant.components.dsmr.sensor import DerivativeDSMREntity
|
||||||
|
|
||||||
|
|
||||||
|
pytest.skip("Dependency missing on PyPi", allow_module_level=True)
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def mock_connection_factory(monkeypatch):
|
def mock_connection_factory(monkeypatch):
|
||||||
@ -97,7 +103,9 @@ async def test_derivative():
|
|||||||
|
|
||||||
config = {"platform": "dsmr"}
|
config = {"platform": "dsmr"}
|
||||||
|
|
||||||
entity = DerivativeDSMREntity("test", "1.0.0", config)
|
# Disabled to satisfy pylint & flake8 caused by disabled import
|
||||||
|
# pylint: disable=undefined-variable
|
||||||
|
entity = DerivativeDSMREntity("test", "1.0.0", config) # noqa: F821
|
||||||
await entity.async_update()
|
await entity.async_update()
|
||||||
|
|
||||||
assert entity.state is None, "initial state not unknown"
|
assert entity.state is None, "initial state not unknown"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user