3232 LiIonBattery ,
3333 Meter ,
3434 SolarInverter ,
35+ SteamBoiler ,
3536 WindTurbine ,
3637)
3738
@@ -144,6 +145,20 @@ def _ev_graph(
144145 )
145146
146147
148+ def _steam_boiler_graph (
149+ config : ComponentGraphConfig | None = None ,
150+ ) -> ComponentGraph [Any , Any , Any ]:
151+ return ComponentGraph (
152+ components = {
153+ _grid (),
154+ _meter (),
155+ SteamBoiler (id = ComponentId (3 ), microgrid_id = _MGRID ),
156+ },
157+ connections = {_conn (1 , 2 ), _conn (2 , 3 )},
158+ config = config or ComponentGraphConfig (),
159+ )
160+
161+
147162_CATEGORIES = [
148163 pytest .param (_pv_graph , "pv_formula" , "prefer_meters_in_pv_formula" , id = "pv" ),
149164 pytest .param (
@@ -165,6 +180,12 @@ def _ev_graph(
165180 "prefer_meters_in_ev_charger_formula" ,
166181 id = "ev_charger" ,
167182 ),
183+ pytest .param (
184+ _steam_boiler_graph ,
185+ "steam_boiler_formula" ,
186+ "prefer_meters_in_steam_boiler_formula" ,
187+ id = "steam_boiler" ,
188+ ),
168189]
169190
170191
@@ -217,13 +238,6 @@ def test_override_false_wins_over_global_true(
217238 assert formula == _DEVICE_PRIMARY
218239
219240
220- # `steam_boiler_formula` cannot be exercised end-to-end because the
221- # upstream `frequenz.client.microgrid` Python package does not currently
222- # expose a `SteamBoiler` component class, so a graph that contains a
223- # steam boiler cannot be constructed from Python yet. The argument-handling
224- # edge cases are still meaningful and worth pinning down.
225-
226-
227241def _empty_graph () -> ComponentGraph [Any , Any , Any ]:
228242 return ComponentGraph (
229243 components = {_grid (), _meter ()},
0 commit comments