Skip to content

Commit 000e1cb

Browse files
unit test add-ons with multiple construction years
1 parent af61f34 commit 000e1cb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/geophires_x_tests/test_economics_sam.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,19 @@ def test_add_ons(self):
790790
file_path=self._get_test_file_path('egs-sam-em-add-ons.txt'),
791791
)
792792

793+
add_ons_multiple_construction_years_result = self._get_result(
794+
{'Do AddOn Calculations': True, 'Construction Years': 3},
795+
file_path=self._get_test_file_path('egs-sam-em-add-ons.txt'),
796+
)
797+
self.assertGreater(
798+
add_ons_multiple_construction_years_result.result['SUMMARY OF RESULTS']['Total CAPEX']['value'],
799+
add_ons_result.result['SUMMARY OF RESULTS']['Total CAPEX']['value'],
800+
)
801+
self.assertEqual(
802+
add_ons_multiple_construction_years_result.result['CAPITAL COSTS (M$)']['Total Add-on CAPEX']['value'],
803+
add_ons_result.result['CAPITAL COSTS (M$)']['Total Add-on CAPEX']['value'],
804+
)
805+
793806
def _assert_capex_line_items_sum_to_total(self, r: GeophiresXResult):
794807
capex_line_items = {key: value for key, value in r.result['CAPITAL COSTS (M$)'].items() if value is not None}
795808

0 commit comments

Comments
 (0)