diff --git a/test/test_analysis_tools.rb b/test/test_analysis_tools.rb index 508b7c612b..f6baa6d03a 100644 --- a/test/test_analysis_tools.rb +++ b/test/test_analysis_tools.rb @@ -77,22 +77,20 @@ def test_baseline_results def test_upgrades_results columns = ['report_simulation_output.energy_use_total_m_btu'] - ['national', 'testing'].each do |project| - results_csvs = Dir[File.join(@buildstock_directory, "buildstockbatch/project_#{project}/#{project}_upgrades/results_csvs/results_up*.csv")] - assert_equal(1, results_csvs.size) - buildstockbatch_path = results_csvs[0] - buildstockbatch = CSV.read(buildstockbatch_path, headers: true) + results_csvs = Dir[File.join(@buildstock_directory, "project_national/sdr_upgrades_tmy3/results_csvs/results_up*.csv")] + assert_equal(17, results_csvs.size) + buildstockbatch_path = results_csvs[16] + buildstockbatch = CSV.read(buildstockbatch_path, headers: true) - run_analysis_path = File.join(@buildstock_directory, "run_analysis/project_#{project}/results-PackageUpgrade.csv") - run_analysis = CSV.read(run_analysis_path, headers: true) + run_analysis_path = File.join(@buildstock_directory, "sdr_upgrades_tmy3/results-EnvelopeOnlyLightTouchEnvelope.csv") + run_analysis = CSV.read(run_analysis_path, headers: true) - columns.each do |col| - buildstockbatch_sum = buildstockbatch[col].map { |v| Float(v) }.sum - run_analysis_sum = run_analysis[col].map { |v| Float(v) }.sum + columns.each do |col| + buildstockbatch_sum = buildstockbatch[col].map { |v| Float(v) }.sum + run_analysis_sum = run_analysis[col].map { |v| Float(v) }.sum - assert_equal(buildstockbatch[col].size, run_analysis[col].size) - assert_in_epsilon(buildstockbatch_sum, run_analysis_sum, 0.01) - end + assert_equal(buildstockbatch[col].size, run_analysis[col].size) + assert_in_epsilon(buildstockbatch_sum, run_analysis_sum, 0.01) end end end