mirror of
https://github.com/home-assistant/core.git
synced 2025-08-02 10:08:23 +00:00
Update tests
This commit is contained in:
parent
0da50c3f14
commit
2058777db6
@ -294,21 +294,10 @@ async def test_restore_state_failed(hass: HomeAssistant, extra_attributes) -> No
|
||||
assert state.state == STATE_UNKNOWN
|
||||
|
||||
|
||||
@pytest.mark.parametrize("force_update", [False, True])
|
||||
@pytest.mark.parametrize(
|
||||
("force_update", "sequence"),
|
||||
"sequence",
|
||||
[
|
||||
(
|
||||
False,
|
||||
(
|
||||
(20, 10, 1.67),
|
||||
(30, 30, 5.0),
|
||||
(40, 5, 7.92),
|
||||
(50, 5, 7.92),
|
||||
(60, 0, 8.75),
|
||||
),
|
||||
),
|
||||
(
|
||||
True,
|
||||
(
|
||||
(20, 10, 1.67),
|
||||
(30, 30, 5.0),
|
||||
@ -316,7 +305,6 @@ async def test_restore_state_failed(hass: HomeAssistant, extra_attributes) -> No
|
||||
(50, 5, 8.75),
|
||||
(60, 0, 9.17),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
async def test_trapezoidal(
|
||||
@ -358,21 +346,10 @@ async def test_trapezoidal(
|
||||
assert state.attributes.get("unit_of_measurement") == UnitOfEnergy.KILO_WATT_HOUR
|
||||
|
||||
|
||||
@pytest.mark.parametrize("force_update", [False, True])
|
||||
@pytest.mark.parametrize(
|
||||
("force_update", "sequence"),
|
||||
"sequence",
|
||||
[
|
||||
(
|
||||
False,
|
||||
(
|
||||
(20, 10, 0.0),
|
||||
(30, 30, 1.67),
|
||||
(40, 5, 6.67),
|
||||
(50, 5, 6.67),
|
||||
(60, 0, 8.33),
|
||||
),
|
||||
),
|
||||
(
|
||||
True,
|
||||
(
|
||||
(20, 10, 0.0),
|
||||
(30, 30, 1.67),
|
||||
@ -380,7 +357,6 @@ async def test_trapezoidal(
|
||||
(50, 5, 7.5),
|
||||
(60, 0, 8.33),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
async def test_left(
|
||||
@ -425,21 +401,10 @@ async def test_left(
|
||||
assert state.attributes.get("unit_of_measurement") == UnitOfEnergy.KILO_WATT_HOUR
|
||||
|
||||
|
||||
@pytest.mark.parametrize("force_update", [False, True])
|
||||
@pytest.mark.parametrize(
|
||||
("force_update", "sequence"),
|
||||
"sequence",
|
||||
[
|
||||
(
|
||||
False,
|
||||
(
|
||||
(20, 10, 3.33),
|
||||
(30, 30, 8.33),
|
||||
(40, 5, 9.17),
|
||||
(50, 5, 9.17),
|
||||
(60, 0, 9.17),
|
||||
),
|
||||
),
|
||||
(
|
||||
True,
|
||||
(
|
||||
(20, 10, 3.33),
|
||||
(30, 30, 8.33),
|
||||
@ -447,7 +412,6 @@ async def test_left(
|
||||
(50, 5, 10.0),
|
||||
(60, 0, 10.0),
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
async def test_right(
|
||||
|
Loading…
x
Reference in New Issue
Block a user