Skip to content

Commit

Permalink
add test for no discount_rate_idv
Browse files Browse the repository at this point in the history
  • Loading branch information
trevorb1 committed Oct 4, 2024
1 parent 8ecec2f commit 6f7178a
Showing 1 changed file with 33 additions and 1 deletion.
34 changes: 33 additions & 1 deletion tests/results/test_results_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 6f7178a

Please sign in to comment.