diff --git a/tests/results/test_results_package.py b/tests/results/test_results_package.py index df8d310..a597d4e 100644 --- a/tests/results/test_results_package.py +++ b/tests/results/test_results_package.py @@ -672,7 +672,7 @@ def test_calculate_captital_investment_with_dr_idv( assert_frame_equal(actual, expected) - def test_calculate_captital_investment_no_dr_idv( + def test_calculate_captital_investment_empty_dr_idv( self, capital_cost, new_capacity, @@ -706,6 +706,38 @@ def test_calculate_captital_investment_no_dr_idv( assert_frame_equal(actual, expected) + def test_calculate_captital_investment_no_dr_idv( + self, + capital_cost, + new_capacity, + operational_life, + region, + year, + discount_rate, + ): + + results = { + "CapitalCost": capital_cost, + "NewCapacity": new_capacity, + "OperationalLife": operational_life, + "REGION": region, + "YEAR": year, + "DiscountRate": discount_rate, + } + + package = ResultsPackage(results) + actual = package.capital_investment() + expected = pd.DataFrame( + data=[ + ["SIMPLICITY", "DUMMY", 2014, 4.104], + ["SIMPLICITY", "GAS_EXTRACTION", 2014, 1.599], + ["SIMPLICITY", "GAS_EXTRACTION", 2016, 5.52], + ], + columns=["REGION", "TECHNOLOGY", "YEAR", "VALUE"], + ).set_index(["REGION", "TECHNOLOGY", "YEAR"]) + + assert_frame_equal(actual, expected) + class TestCapitalRecoveryFactor: def test_crf(self, region, discount_rate_idv, operational_life):