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,28 +294,16 @@ async def test_restore_state_failed(hass: HomeAssistant, extra_attributes) -> No
|
|||||||
assert state.state == STATE_UNKNOWN
|
assert state.state == STATE_UNKNOWN
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize("force_update", [False, True])
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
("force_update", "sequence"),
|
"sequence",
|
||||||
[
|
[
|
||||||
(
|
(
|
||||||
False,
|
(20, 10, 1.67),
|
||||||
(
|
(30, 30, 5.0),
|
||||||
(20, 10, 1.67),
|
(40, 5, 7.92),
|
||||||
(30, 30, 5.0),
|
(50, 5, 8.75),
|
||||||
(40, 5, 7.92),
|
(60, 0, 9.17),
|
||||||
(50, 5, 7.92),
|
|
||||||
(60, 0, 8.75),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
(
|
|
||||||
True,
|
|
||||||
(
|
|
||||||
(20, 10, 1.67),
|
|
||||||
(30, 30, 5.0),
|
|
||||||
(40, 5, 7.92),
|
|
||||||
(50, 5, 8.75),
|
|
||||||
(60, 0, 9.17),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
@ -358,28 +346,16 @@ async def test_trapezoidal(
|
|||||||
assert state.attributes.get("unit_of_measurement") == UnitOfEnergy.KILO_WATT_HOUR
|
assert state.attributes.get("unit_of_measurement") == UnitOfEnergy.KILO_WATT_HOUR
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize("force_update", [False, True])
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
("force_update", "sequence"),
|
"sequence",
|
||||||
[
|
[
|
||||||
(
|
(
|
||||||
False,
|
(20, 10, 0.0),
|
||||||
(
|
(30, 30, 1.67),
|
||||||
(20, 10, 0.0),
|
(40, 5, 6.67),
|
||||||
(30, 30, 1.67),
|
(50, 5, 7.5),
|
||||||
(40, 5, 6.67),
|
(60, 0, 8.33),
|
||||||
(50, 5, 6.67),
|
|
||||||
(60, 0, 8.33),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
(
|
|
||||||
True,
|
|
||||||
(
|
|
||||||
(20, 10, 0.0),
|
|
||||||
(30, 30, 1.67),
|
|
||||||
(40, 5, 6.67),
|
|
||||||
(50, 5, 7.5),
|
|
||||||
(60, 0, 8.33),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
@ -425,28 +401,16 @@ async def test_left(
|
|||||||
assert state.attributes.get("unit_of_measurement") == UnitOfEnergy.KILO_WATT_HOUR
|
assert state.attributes.get("unit_of_measurement") == UnitOfEnergy.KILO_WATT_HOUR
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize("force_update", [False, True])
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
("force_update", "sequence"),
|
"sequence",
|
||||||
[
|
[
|
||||||
(
|
(
|
||||||
False,
|
(20, 10, 3.33),
|
||||||
(
|
(30, 30, 8.33),
|
||||||
(20, 10, 3.33),
|
(40, 5, 9.17),
|
||||||
(30, 30, 8.33),
|
(50, 5, 10.0),
|
||||||
(40, 5, 9.17),
|
(60, 0, 10.0),
|
||||||
(50, 5, 9.17),
|
|
||||||
(60, 0, 9.17),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
(
|
|
||||||
True,
|
|
||||||
(
|
|
||||||
(20, 10, 3.33),
|
|
||||||
(30, 30, 8.33),
|
|
||||||
(40, 5, 9.17),
|
|
||||||
(50, 5, 10.0),
|
|
||||||
(60, 0, 10.0),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user