Skip to content

Commit 639ff06

Browse files
committed
fixup! Add a Sensor class
Remove redundat test sensor.
1 parent a5009d8 commit 639ff06

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

tests/test_sensor.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -98,21 +98,13 @@ def test_sensor_str(name: str | None, expected_str: str) -> None:
9898
model_name=_SENSOR.model_name,
9999
)
100100

101-
_DIFFERENT_BOTH_ID = Sensor(
102-
id=SensorId(2),
103-
name=_SENSOR.name,
104-
manufacturer=_SENSOR.manufacturer,
105-
model_name=_SENSOR.model_name,
106-
)
107-
108101

109102
@pytest.mark.parametrize(
110103
"comp,expected",
111104
[
112105
pytest.param(_SENSOR, True, id="self"),
113106
pytest.param(_DIFFERENT_NAME, False, id="other-name"),
114107
pytest.param(_DIFFERENT_ID, False, id="other-id"),
115-
pytest.param(_DIFFERENT_BOTH_ID, False, id="other-both-ids"),
116108
],
117109
ids=lambda o: str(o.id) if isinstance(o, Sensor) else str(o),
118110
)
@@ -130,7 +122,6 @@ def test_sensor_equality(comp: Sensor, expected: bool) -> None:
130122
pytest.param(_SENSOR, True, id="self"),
131123
pytest.param(_DIFFERENT_NAME, True, id="other-name"),
132124
pytest.param(_DIFFERENT_ID, False, id="other-id"),
133-
pytest.param(_DIFFERENT_BOTH_ID, False, id="other-both-ids"),
134125
],
135126
)
136127
def test_sensor_identity(comp: Sensor, expected: bool) -> None:
@@ -143,7 +134,6 @@ def test_sensor_identity(comp: Sensor, expected: bool) -> None:
143134
pytest.param(_SENSOR, id="comp"),
144135
pytest.param(_DIFFERENT_NAME, id="name"),
145136
pytest.param(_DIFFERENT_ID, id="id"),
146-
pytest.param(_DIFFERENT_BOTH_ID, id="both_ids"),
147137
]
148138

149139

0 commit comments

Comments
 (0)