Skip to content

Commit 5c989e9

Browse files
update unit test
1 parent a999d09 commit 5c989e9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/geophires_x_tests/test_economics_sam.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -651,13 +651,14 @@ def test_royalty_rate(self):
651651
def get_row(name: str):
652652
return EconomicsSamTestCase._get_cash_flow_row(cash_flow, name)
653653

654-
ppa_revenue_row = get_row('PPA revenue ($)')
655-
expected_royalties = [x * royalty_rate for x in ppa_revenue_row]
654+
ppa_revenue_row_USD = get_row('PPA revenue ($)')
655+
expected_royalties_USD = [x * royalty_rate for x in ppa_revenue_row_USD]
656+
expected_royalties_MUSD = [x * 1e-6 for x in expected_royalties_USD]
656657

657-
self.assertListEqual(expected_royalties, sam_econ.royalties_opex)
658+
self.assertListEqual(expected_royalties_MUSD, sam_econ.royalties_opex)
658659

659660
om_prod_based_expense_row = get_row('O&M production-based expense ($)')
660-
self.assertListAlmostEqual(expected_royalties, om_prod_based_expense_row, places=0)
661+
self.assertListAlmostEqual(expected_royalties_USD, om_prod_based_expense_row, places=0)
661662
# Note the above assertion assumes royalties are the only production-based O&M expenses. If this changes,
662663
# the assertion will need to be updated.
663664

0 commit comments

Comments
 (0)