def test_pvav_dict_methods(): """Test the to/from dict methods.""" hvac_sys = PVAV('High Efficiency HVAC System') hvac_sys.vintage = 'ASHRAE_2010' hvac_sys.equipment_type = 'PVAV_DHW' hvac_sys.economizer_type = 'DifferentialDryBulb' hvac_sys.sensible_heat_recovery = 0.8 hvac_sys.latent_heat_recovery = 0.65 hvac_dict = hvac_sys.to_dict() new_hvac_sys = PVAV.from_dict(hvac_dict) assert new_hvac_sys == hvac_sys assert hvac_dict == new_hvac_sys.to_dict()
def test_pvav_init(): """Test the initialization of PVAV and basic properties.""" hvac_sys = PVAV('Test System') str(hvac_sys) # test the string representation assert hvac_sys.identifier == 'Test System' assert hvac_sys.vintage == 'ASHRAE_2019' assert hvac_sys.equipment_type == 'PVAV_Boiler' assert hvac_sys.economizer_type == 'NoEconomizer' assert hvac_sys.sensible_heat_recovery == 0 assert hvac_sys.latent_heat_recovery == 0 hvac_sys.vintage = 'ASHRAE_2010' hvac_sys.equipment_type = 'PVAV_DHW' hvac_sys.economizer_type = 'DifferentialDryBulb' hvac_sys.sensible_heat_recovery = 0.8 hvac_sys.latent_heat_recovery = 0.65 assert hvac_sys.vintage == 'ASHRAE_2010' assert hvac_sys.equipment_type == 'PVAV_DHW' assert hvac_sys.economizer_type == 'DifferentialDryBulb' assert hvac_sys.sensible_heat_recovery == 0.8 assert hvac_sys.latent_heat_recovery == 0.65