Skip to content

Commit aebf5fb

Browse files
committed
Fix CI failures: mark integration test and resolve mypy attr-defined errors
Add @pytest.mark.integration to test_createSimulations so it is skipped in CI where no STOMP broker is available. Fix mypy attr-defined errors in field_proxy_forwarder.py by extracting mRID with a type ignore.
1 parent 324840c commit aebf5fb

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

gridappsd-field-bus-lib/gridappsd_field_bus/field_interface/field_proxy_forwarder.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,9 @@ def __init__(self, connection_url: str, username: str, password: str, mrid: str)
103103
self.network.get_all_edges(cim.Substation)
104104

105105
for substation in self.network.graph.get(cim.Substation, {}).values():
106-
print(f"Subscribing to Substation: /topic/goss.gridappsd.field.{substation.mRID}")
107-
self.ot_connection.subscribe("/topic/goss.gridappsd.field." + substation.mRID, self.on_message_from_ot)
106+
mrid = substation.mRID # type: ignore[attr-defined]
107+
print(f"Subscribing to Substation: /topic/goss.gridappsd.field.{mrid}")
108+
self.ot_connection.subscribe("/topic/goss.gridappsd.field." + mrid, self.on_message_from_ot)
108109

109110
# self.ot_connection.subscribe(topics.BASE_FIELD_TOPIC, self.on_message_from_ot)
110111

gridappsd-python-lib/tests/test_simulation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def createGadObject():
2424
os.environ['GRIDAPPSD_PASSWORD'] = 'manager'
2525
return GridAPPSD()
2626

27+
@pytest.mark.integration
2728
def test_createSimulations(createGadObject):
2829
gadObj = createGadObject
2930
response = gadObj.query_model_info()

0 commit comments

Comments
 (0)