UniSet 2.45.1
Класс tests.test_e2e.TestThermostatE2E

Открытые члены

 test_contains_load_statement (self)
 test_input_sensors_in_uniset_inputs (self)
 test_output_sensors_in_uniset_outputs (self)
 test_scale_factor_for_temperature (self)
 test_fb_instantiations (self)
 test_switch_case_for_state (self)
 test_struct_field_access (self)
 test_struct_initial_values (self)
 test_fb_update_calls (self)
 test_fb_output_access (self)
 test_program_name_in_comment (self)
 test_contains_uniset_on_step (self)
 test_if_else_for_temperature_comparison (self)
 test_local_variables (self)
 test_js_structure_order (self)
 test_cli_thermostat_pipeline (self)
 test_cli_thermostat_output_to_file (self)

Защищенные члены

str _run_thermostat_pipeline (self)

Подробное описание

Full E2E test with a realistic thermostat control program.

Uses most st2js features: STRUCT, FB instances (TON, R_TRIG, CTU, TOF),
CASE/IF control flow, scale factors, field access, and sensor mapping.

Методы

◆ _run_thermostat_pipeline()

str tests.test_e2e.TestThermostatE2E._run_thermostat_pipeline ( self)
protected
Run the full pipeline on thermostat.st + thermostat_mapping.yaml.

◆ test_cli_thermostat_output_to_file()

tests.test_e2e.TestThermostatE2E.test_cli_thermostat_output_to_file ( self)
Test CLI writes thermostat output to file.

◆ test_cli_thermostat_pipeline()

tests.test_e2e.TestThermostatE2E.test_cli_thermostat_pipeline ( self)
Test thermostat through CLI subprocess -- exit code 0.

◆ test_fb_instantiations()

tests.test_e2e.TestThermostatE2E.test_fb_instantiations ( self)
All declared FBs should be instantiated.

◆ test_fb_output_access()

tests.test_e2e.TestThermostatE2E.test_fb_output_access ( self)
FB output access like startEdge.Q, onDelay.Q, cycleCounter.CV.

◆ test_fb_update_calls()

tests.test_e2e.TestThermostatE2E.test_fb_update_calls ( self)
FB calls should emit update() methods.

◆ test_js_structure_order()

tests.test_e2e.TestThermostatE2E.test_js_structure_order ( self)
Verify sections appear in correct order.

◆ test_scale_factor_for_temperature()

tests.test_e2e.TestThermostatE2E.test_scale_factor_for_temperature ( self)
REAL input with scale: 100 should emit division.

◆ test_struct_field_access()

tests.test_e2e.TestThermostatE2E.test_struct_field_access ( self)
config.setpoint / config.hysteresis / config.maxTemp should appear.

◆ test_struct_initial_values()

tests.test_e2e.TestThermostatE2E.test_struct_initial_values ( self)
STRUCT should be initialized with its default values.

◆ test_switch_case_for_state()

tests.test_e2e.TestThermostatE2E.test_switch_case_for_state ( self)
CASE state OF should generate switch/case.