Skip to content

Commit

Permalink
Correcting variable name in unit testing cases
Browse files Browse the repository at this point in the history
  • Loading branch information
mehdiwahada committed Oct 30, 2024
1 parent 8bc9f27 commit 1d18234
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/test_ts_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ def test_one_unit_cluster(cluster_1, output_directory):
tot_po = 0
tot_fo = 0
for i in range(365 * ts_nb):
tot_po += results.planned_outages[i % 365][i // 365] * 2
tot_fo += results.forced_outages[i % 365][i // 365] * 8
tot_po += results.outage_output.planned_outages[i % 365][i // 365] * 2
tot_fo += results.outage_output.forced_outages[i % 365][i // 365] * 8
true_por = tot_po / (365 * ts_nb)
true_for = tot_fo / (365 * ts_nb)

Expand All @@ -66,8 +66,8 @@ def test_hundred_unit_cluster(cluster_100, output_directory):
tot_po = 0
tot_fo = 0
for i in range(365 * ts_nb):
tot_po += results.planned_outages[i % 365][i // 365] * 2
tot_fo += results.forced_outages[i % 365][i // 365] * 8
tot_po += results.outage_output.planned_outages[i % 365][i // 365] * 2
tot_fo += results.outage_output.forced_outages[i % 365][i // 365] * 8
true_por = tot_po / (365 * ts_nb)
true_for = tot_fo / (365 * ts_nb)

Expand All @@ -76,8 +76,8 @@ def test_hundred_unit_cluster(cluster_100, output_directory):
cursor = [0] * 10
tot_simult_po = 0
for i in range(365 * ts_nb):
po = results.planned_outages[i % 365][i // 365]
mo = results.mixed_outages[i % 365][i // 365]
po = results.outage_output.planned_outages[i % 365][i // 365]
mo = results.outage_output.mixed_outages[i % 365][i // 365]

tot_simult_po += po
tot_simult_po += mo
Expand Down Expand Up @@ -117,8 +117,8 @@ def test_max_po(cluster_high_por, output_directory):
cursor = [0] * 10
tot_simult_po = 0
for i in range(365 * ts_nb):
po = results.planned_outages[i % 365][i // 365]
mo = results.mixed_outages[i % 365][i // 365]
po = results.outage_output.planned_outages[i % 365][i // 365]
mo = results.outage_output.mixed_outages[i % 365][i // 365]

tot_simult_po += po
tot_simult_po += mo
Expand Down

0 comments on commit 1d18234

Please sign in to comment.