Improve ApplyUpgrade unit tests for heat pumps#1477
Conversation
| heat_pump_backup_type = measure.get_heat_pump_backup_type(heating_system, heat_pump_type, heat_pump_is_ducted) | ||
| actual_values = measure.get_heat_pump_backup_values(heating_system) | ||
| actual_values['heat_pump_backup_type'] = heat_pump_backup_type | ||
| measure.set_existing_system_as_heat_pump_backup(runner, measures, hpxml_bldg) |
There was a problem hiding this comment.
Call this parent method instead. Then we can check BuildResidentialHPXML argument assignments.
| hpxml.buildings.each do |hpxml_bldg| | ||
| actual_values = measure.get_duct_restriction_values(hpxml_bldg) | ||
| baseline_max_airflow_cfm = actual_values['max_airflow_cfm'] | ||
| baseline_max_airflow_cfm = measure.set_autosizing_limits(runner, measures, hpxml_bldg) |
There was a problem hiding this comment.
Call this parent method instead. Then we can check BuildResidentialHPXML argument assignments.
There was a problem hiding this comment.
I can't replace calling get_adjusted_fan_watts_per_cfm with parent set_adjusted_fan_efficiency since we're not actually re-applying the BuildResidentialHPXML measure first.
shorowit
left a comment
There was a problem hiding this comment.
I didn't scrutinize the tests, but I was able to replicate the results in my refactor branch. Very helpful.
| _test_duct_restriction('false', nil, nil, expected_values) | ||
|
|
||
| expected_values = { | ||
| 'baseline_max_airflow_cfm' => 2182.0 / 0.75, |
There was a problem hiding this comment.
Note that some of these numbers will change when we pull this into latest-os-hpxml because of updated cfm/ton assumptions.
Pull Request Description
Addresses an item in #1473.
Related Pull Requests
[related PRs from different repositories]
Related Issues
[What issue(s) is the PR addressing]
Checklist
Required:
Optional (not all items may apply):
openstudio tasks.rb update_measureshas been run