Skip to content

Commit 0c0130a

Browse files
committed
#10944 fix CI: remove misplaced Python test, drop redundant stream clears
Python-API test in EMSManager.unit.cc violated testing pattern and failed Linux CI (missing include + state.get() on raw pointer). Keep single Python test in datatransfer.unit.cc where fixture belongs. Also drop compare_err_stream("") pre-clears per review - substring search is targeted, collision with setup chatter impossible.
1 parent cc9bca0 commit 0c0130a

2 files changed

Lines changed: 0 additions & 45 deletions

File tree

tst/EnergyPlus/unit/EMSManager.unit.cc

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -3059,8 +3059,6 @@ TEST_F(EnergyPlusFixture, UnusedActuatorWarning)
30593059
EMSManager::ManageEMS(*state, EMSManager::EMSCallFrom::SetupSimulation, anyRan, ObjexxFCL::Optional_int_const());
30603060
EMSManager::ManageEMS(*state, EMSManager::EMSCallFrom::BeginTimestepBeforePredictor, anyRan, ObjexxFCL::Optional_int_const());
30613061

3062-
compare_err_stream(""); // drop any setup chatter
3063-
30643062
EMSManager::checkForUnusedActuatorsAtEnd(*state);
30653063

30663064
EXPECT_TRUE(compare_err_stream_substring("Unused EMS Actuator detected", false));
@@ -3112,49 +3110,7 @@ TEST_F(EnergyPlusFixture, UnusedActuatorWarning_ConditionalNullBranchNotFalsePos
31123110
EMSManager::ManageEMS(*state, EMSManager::EMSCallFrom::SetupSimulation, anyRan, ObjexxFCL::Optional_int_const());
31133111
EMSManager::ManageEMS(*state, EMSManager::EMSCallFrom::BeginTimestepBeforePredictor, anyRan, ObjexxFCL::Optional_int_const());
31143112

3115-
compare_err_stream(""); // drop any setup chatter
3116-
31173113
EMSManager::checkForUnusedActuatorsAtEnd(*state);
31183114

31193115
EXPECT_FALSE(compare_err_stream_substring("Unused EMS Actuator detected", false, false));
31203116
}
3121-
3122-
TEST_F(EnergyPlusFixture, UnusedActuatorWarning_PythonHandleMarksActuatorAsUsed)
3123-
{
3124-
// Issue #10944: IDF-declared actuator + Python grabs handle but no Erl SET anywhere.
3125-
// Python API path must flip wasActuated on handle retrieval so the end-of-sim check
3126-
// doesn't false-positive on legitimate Python-driven actuators.
3127-
std::string const idf_objects = delimited_string({
3128-
3129-
"OutdoorAir:Node, Test node;",
3130-
3131-
"EnergyManagementSystem:Actuator,",
3132-
"TempSetpointLo, !- Name",
3133-
"Test node, !- Actuated Component Unique Name",
3134-
"System Node Setpoint, !- Actuated Component Type",
3135-
"Temperature Minimum Setpoint; !- Actuated Component Control Type",
3136-
3137-
});
3138-
3139-
ASSERT_TRUE(process_idf(idf_objects));
3140-
state->init_state(*state);
3141-
3142-
OutAirNodeManager::SetOutAirNodes(*state);
3143-
EMSManager::CheckIfAnyEMS(*state);
3144-
state->dataEMSMgr->FinishProcessingUserInput = true;
3145-
3146-
bool anyRan;
3147-
EMSManager::ManageEMS(*state, EMSManager::EMSCallFrom::SetupSimulation, anyRan, ObjexxFCL::Optional_int_const());
3148-
ASSERT_EQ(1, state->dataRuntimeLang->numActuatorsUsed);
3149-
3150-
EXPECT_FALSE(state->dataRuntimeLang->EMSActuatorUsed(1).wasActuated);
3151-
3152-
int hActuator = getActuatorHandle(state.get(), "System Node Setpoint", "Temperature Minimum Setpoint", "Test node");
3153-
EXPECT_GT(hActuator, -1);
3154-
3155-
EXPECT_TRUE(state->dataRuntimeLang->EMSActuatorUsed(1).wasActuated);
3156-
3157-
compare_err_stream("", true); // drop the expected duplicate-definition chatter
3158-
EMSManager::checkForUnusedActuatorsAtEnd(*state);
3159-
EXPECT_FALSE(compare_err_stream_substring("Unused EMS Actuator detected", false, false));
3160-
}

tst/EnergyPlus/unit/api/datatransfer.unit.cc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,7 +739,6 @@ TEST_F(DataExchangeAPIUnitTestFixture, DataTransfer_PythonHandle_MarksActuatorAs
739739
// getActuatorHandle should have flipped the flag
740740
EXPECT_TRUE(state->dataRuntimeLang->EMSActuatorUsed(1).wasActuated);
741741

742-
compare_err_stream("", true); // drop expected duplicate-definition warning
743742
EMSManager::checkForUnusedActuatorsAtEnd(*state);
744743
EXPECT_FALSE(compare_err_stream_substring("Unused EMS Actuator detected", false, false));
745744
}

0 commit comments

Comments
 (0)