Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Formatting, removing unnessecary require, adjusting print statement #1755

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
require_relative '../../../helpers/minitest_helper'
require_relative '../../../helpers/create_doe_prototype_helper'
require_relative '../../../helpers/compare_models_helper'
require_relative '../resources/regression_helper'

class Test_<%=building_type%>_<%=template%>_<%=primary_heating_fuel%> < NECBRegressionHelper
def setup()
super()
end
def test_<%=template%>_<%=building_type%>_regression_<%=primary_heating_fuel%>()
result, diff = create_model_and_regression_test(building_type: '<%=building_type%>',primary_heating_fuel: '<%=primary_heating_fuel%>', epw_file: '<%=epw_file%>',template: '<%=template%>', run_simulation: <%=@run_simulation%>)
if result == false
puts "JSON terse listing of diff-errors."
puts diff
puts "Pretty listing of diff-errors for readability."
puts JSON.pretty_generate( diff )
puts "You can find the saved json diff file here test/necb/regression_models/<%=building_type%>-<%=template%>-<%=primary_heating_fuel%>_<%=File.basename(epw_file, ".epw")%>_diffs.json"
puts "outputing errors here. "
puts diff["diffs-errors"] if result == false
end
assert(result, diff)
end
def setup()
super()
end

def test_<%=template%>_<%=building_type%>_regression_<%=primary_heating_fuel%>()
result, diff = create_model_and_regression_test(
building_type: '<%=building_type%>',
primary_heating_fuel: '<%=primary_heating_fuel%>',
epw_file: '<%=epw_file%>',
template: '<%=template%>',
run_simulation: <%=@run_simulation%>
)
if result == false
puts "JSON terse listing of diff-errors."
puts diff
puts "Pretty listing of diff-errors for readability."
puts JSON.pretty_generate( diff )
puts "You can find the saved json diff file here test/necb/building_regression_tests/expected_results/<%=building_type%>-<%=template%>-<%=primary_heating_fuel%>_<%=File.basename(epw_file, ".epw")%>_diffs.json"
puts "outputing errors here. "
puts diff["diffs-errors"] if result == false
end
assert(result, diff)
end
end
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
require_relative '../../../helpers/minitest_helper'
require_relative '../../../helpers/create_doe_prototype_helper'
require_relative '../../../helpers/compare_models_helper'
require_relative '../resources/regression_helper'

class Test_FullServiceRestaurant_BTAP1980TO2010_Electricity < NECBRegressionHelper
def setup()
super()
end
def test_BTAP1980TO2010_FullServiceRestaurant_regression_Electricity()
result, diff = create_model_and_regression_test(building_type: 'FullServiceRestaurant',primary_heating_fuel: 'Electricity', epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw',template: 'BTAP1980TO2010', run_simulation: false)
if result == false
puts "JSON terse listing of diff-errors."
puts diff
puts "Pretty listing of diff-errors for readability."
puts JSON.pretty_generate( diff )
puts "You can find the saved json diff file here test/necb/regression_models/FullServiceRestaurant-BTAP1980TO2010-Electricity_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json"
puts "outputing errors here. "
puts diff["diffs-errors"] if result == false
end
assert(result, diff)
end
def setup()
super()
end

def test_BTAP1980TO2010_FullServiceRestaurant_regression_Electricity()
result, diff = create_model_and_regression_test(
building_type: 'FullServiceRestaurant',
primary_heating_fuel: 'Electricity',
epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw',
template: 'BTAP1980TO2010',
run_simulation: false
)
if result == false
puts "JSON terse listing of diff-errors."
puts diff
puts "Pretty listing of diff-errors for readability."
puts JSON.pretty_generate( diff )
puts "You can find the saved json diff file here test/necb/building_regression_tests/expected_results/FullServiceRestaurant-BTAP1980TO2010-Electricity_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json"
puts "outputing errors here. "
puts diff["diffs-errors"] if result == false
end
assert(result, diff)
end
end
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
require_relative '../../../helpers/minitest_helper'
require_relative '../../../helpers/create_doe_prototype_helper'
require_relative '../../../helpers/compare_models_helper'
require_relative '../resources/regression_helper'

class Test_FullServiceRestaurant_BTAP1980TO2010_ElectricityHPElecBackup < NECBRegressionHelper
def setup()
super()
end
def test_BTAP1980TO2010_FullServiceRestaurant_regression_ElectricityHPElecBackup()
result, diff = create_model_and_regression_test(building_type: 'FullServiceRestaurant',primary_heating_fuel: 'ElectricityHPElecBackup', epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw',template: 'BTAP1980TO2010', run_simulation: false)
if result == false
puts "JSON terse listing of diff-errors."
puts diff
puts "Pretty listing of diff-errors for readability."
puts JSON.pretty_generate( diff )
puts "You can find the saved json diff file here test/necb/regression_models/FullServiceRestaurant-BTAP1980TO2010-ElectricityHPElecBackup_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json"
puts "outputing errors here. "
puts diff["diffs-errors"] if result == false
end
assert(result, diff)
end
def setup()
super()
end

def test_BTAP1980TO2010_FullServiceRestaurant_regression_ElectricityHPElecBackup()
result, diff = create_model_and_regression_test(
building_type: 'FullServiceRestaurant',
primary_heating_fuel: 'ElectricityHPElecBackup',
epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw',
template: 'BTAP1980TO2010',
run_simulation: false
)
if result == false
puts "JSON terse listing of diff-errors."
puts diff
puts "Pretty listing of diff-errors for readability."
puts JSON.pretty_generate( diff )
puts "You can find the saved json diff file here test/necb/building_regression_tests/expected_results/FullServiceRestaurant-BTAP1980TO2010-ElectricityHPElecBackup_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json"
puts "outputing errors here. "
puts diff["diffs-errors"] if result == false
end
assert(result, diff)
end
end
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
require_relative '../../../helpers/minitest_helper'
require_relative '../../../helpers/create_doe_prototype_helper'
require_relative '../../../helpers/compare_models_helper'
require_relative '../resources/regression_helper'

class Test_FullServiceRestaurant_BTAP1980TO2010_ElectricityHPGasBackupMixed < NECBRegressionHelper
def setup()
super()
end
def test_BTAP1980TO2010_FullServiceRestaurant_regression_ElectricityHPGasBackupMixed()
result, diff = create_model_and_regression_test(building_type: 'FullServiceRestaurant',primary_heating_fuel: 'ElectricityHPGasBackupMixed', epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw',template: 'BTAP1980TO2010', run_simulation: false)
if result == false
puts "JSON terse listing of diff-errors."
puts diff
puts "Pretty listing of diff-errors for readability."
puts JSON.pretty_generate( diff )
puts "You can find the saved json diff file here test/necb/regression_models/FullServiceRestaurant-BTAP1980TO2010-ElectricityHPGasBackupMixed_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json"
puts "outputing errors here. "
puts diff["diffs-errors"] if result == false
end
assert(result, diff)
end
def setup()
super()
end

def test_BTAP1980TO2010_FullServiceRestaurant_regression_ElectricityHPGasBackupMixed()
result, diff = create_model_and_regression_test(
building_type: 'FullServiceRestaurant',
primary_heating_fuel: 'ElectricityHPGasBackupMixed',
epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw',
template: 'BTAP1980TO2010',
run_simulation: false
)
if result == false
puts "JSON terse listing of diff-errors."
puts diff
puts "Pretty listing of diff-errors for readability."
puts JSON.pretty_generate( diff )
puts "You can find the saved json diff file here test/necb/building_regression_tests/expected_results/FullServiceRestaurant-BTAP1980TO2010-ElectricityHPGasBackupMixed_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json"
puts "outputing errors here. "
puts diff["diffs-errors"] if result == false
end
assert(result, diff)
end
end
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
require_relative '../../../helpers/minitest_helper'
require_relative '../../../helpers/create_doe_prototype_helper'
require_relative '../../../helpers/compare_models_helper'
require_relative '../resources/regression_helper'

class Test_FullServiceRestaurant_BTAP1980TO2010_NaturalGas < NECBRegressionHelper
def setup()
super()
end
def test_BTAP1980TO2010_FullServiceRestaurant_regression_NaturalGas()
result, diff = create_model_and_regression_test(building_type: 'FullServiceRestaurant',primary_heating_fuel: 'NaturalGas', epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw',template: 'BTAP1980TO2010', run_simulation: false)
if result == false
puts "JSON terse listing of diff-errors."
puts diff
puts "Pretty listing of diff-errors for readability."
puts JSON.pretty_generate( diff )
puts "You can find the saved json diff file here test/necb/regression_models/FullServiceRestaurant-BTAP1980TO2010-NaturalGas_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json"
puts "outputing errors here. "
puts diff["diffs-errors"] if result == false
end
assert(result, diff)
end
def setup()
super()
end

def test_BTAP1980TO2010_FullServiceRestaurant_regression_NaturalGas()
result, diff = create_model_and_regression_test(
building_type: 'FullServiceRestaurant',
primary_heating_fuel: 'NaturalGas',
epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw',
template: 'BTAP1980TO2010',
run_simulation: false
)
if result == false
puts "JSON terse listing of diff-errors."
puts diff
puts "Pretty listing of diff-errors for readability."
puts JSON.pretty_generate( diff )
puts "You can find the saved json diff file here test/necb/building_regression_tests/expected_results/FullServiceRestaurant-BTAP1980TO2010-NaturalGas_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json"
puts "outputing errors here. "
puts diff["diffs-errors"] if result == false
end
assert(result, diff)
end
end
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
require_relative '../../../helpers/minitest_helper'
require_relative '../../../helpers/create_doe_prototype_helper'
require_relative '../../../helpers/compare_models_helper'
require_relative '../resources/regression_helper'

class Test_FullServiceRestaurant_BTAP1980TO2010_NaturalGasHPElecBackupMixed < NECBRegressionHelper
def setup()
super()
end
def test_BTAP1980TO2010_FullServiceRestaurant_regression_NaturalGasHPElecBackupMixed()
result, diff = create_model_and_regression_test(building_type: 'FullServiceRestaurant',primary_heating_fuel: 'NaturalGasHPElecBackupMixed', epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw',template: 'BTAP1980TO2010', run_simulation: false)
if result == false
puts "JSON terse listing of diff-errors."
puts diff
puts "Pretty listing of diff-errors for readability."
puts JSON.pretty_generate( diff )
puts "You can find the saved json diff file here test/necb/regression_models/FullServiceRestaurant-BTAP1980TO2010-NaturalGasHPElecBackupMixed_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json"
puts "outputing errors here. "
puts diff["diffs-errors"] if result == false
end
assert(result, diff)
end
def setup()
super()
end

def test_BTAP1980TO2010_FullServiceRestaurant_regression_NaturalGasHPElecBackupMixed()
result, diff = create_model_and_regression_test(
building_type: 'FullServiceRestaurant',
primary_heating_fuel: 'NaturalGasHPElecBackupMixed',
epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw',
template: 'BTAP1980TO2010',
run_simulation: false
)
if result == false
puts "JSON terse listing of diff-errors."
puts diff
puts "Pretty listing of diff-errors for readability."
puts JSON.pretty_generate( diff )
puts "You can find the saved json diff file here test/necb/building_regression_tests/expected_results/FullServiceRestaurant-BTAP1980TO2010-NaturalGasHPElecBackupMixed_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json"
puts "outputing errors here. "
puts diff["diffs-errors"] if result == false
end
assert(result, diff)
end
end
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
require_relative '../../../helpers/minitest_helper'
require_relative '../../../helpers/create_doe_prototype_helper'
require_relative '../../../helpers/compare_models_helper'
require_relative '../resources/regression_helper'

class Test_FullServiceRestaurant_BTAP1980TO2010_NaturalGasHPGasBackup < NECBRegressionHelper
def setup()
super()
end
def test_BTAP1980TO2010_FullServiceRestaurant_regression_NaturalGasHPGasBackup()
result, diff = create_model_and_regression_test(building_type: 'FullServiceRestaurant',primary_heating_fuel: 'NaturalGasHPGasBackup', epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw',template: 'BTAP1980TO2010', run_simulation: false)
if result == false
puts "JSON terse listing of diff-errors."
puts diff
puts "Pretty listing of diff-errors for readability."
puts JSON.pretty_generate( diff )
puts "You can find the saved json diff file here test/necb/regression_models/FullServiceRestaurant-BTAP1980TO2010-NaturalGasHPGasBackup_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json"
puts "outputing errors here. "
puts diff["diffs-errors"] if result == false
end
assert(result, diff)
end
def setup()
super()
end

def test_BTAP1980TO2010_FullServiceRestaurant_regression_NaturalGasHPGasBackup()
result, diff = create_model_and_regression_test(
building_type: 'FullServiceRestaurant',
primary_heating_fuel: 'NaturalGasHPGasBackup',
epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw',
template: 'BTAP1980TO2010',
run_simulation: false
)
if result == false
puts "JSON terse listing of diff-errors."
puts diff
puts "Pretty listing of diff-errors for readability."
puts JSON.pretty_generate( diff )
puts "You can find the saved json diff file here test/necb/building_regression_tests/expected_results/FullServiceRestaurant-BTAP1980TO2010-NaturalGasHPGasBackup_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json"
puts "outputing errors here. "
puts diff["diffs-errors"] if result == false
end
assert(result, diff)
end
end
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
require_relative '../../../helpers/minitest_helper'
require_relative '../../../helpers/create_doe_prototype_helper'
require_relative '../../../helpers/compare_models_helper'
require_relative '../resources/regression_helper'

class Test_FullServiceRestaurant_BTAPPRE1980_Electricity < NECBRegressionHelper
def setup()
super()
end
def test_BTAPPRE1980_FullServiceRestaurant_regression_Electricity()
result, diff = create_model_and_regression_test(building_type: 'FullServiceRestaurant',primary_heating_fuel: 'Electricity', epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw',template: 'BTAPPRE1980', run_simulation: false)
if result == false
puts "JSON terse listing of diff-errors."
puts diff
puts "Pretty listing of diff-errors for readability."
puts JSON.pretty_generate( diff )
puts "You can find the saved json diff file here test/necb/regression_models/FullServiceRestaurant-BTAPPRE1980-Electricity_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json"
puts "outputing errors here. "
puts diff["diffs-errors"] if result == false
end
assert(result, diff)
end
def setup()
super()
end

def test_BTAPPRE1980_FullServiceRestaurant_regression_Electricity()
result, diff = create_model_and_regression_test(
building_type: 'FullServiceRestaurant',
primary_heating_fuel: 'Electricity',
epw_file: 'CAN_AB_Calgary.Intl.AP.718770_CWEC2020.epw',
template: 'BTAPPRE1980',
run_simulation: false
)
if result == false
puts "JSON terse listing of diff-errors."
puts diff
puts "Pretty listing of diff-errors for readability."
puts JSON.pretty_generate( diff )
puts "You can find the saved json diff file here test/necb/building_regression_tests/expected_results/FullServiceRestaurant-BTAPPRE1980-Electricity_CAN_AB_Calgary.Intl.AP.718770_CWEC2020_diffs.json"
puts "outputing errors here. "
puts diff["diffs-errors"] if result == false
end
assert(result, diff)
end
end
Loading