Skip to content

Commit

Permalink
fix typing
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinBelthle committed Oct 22, 2024
1 parent cd6e5ac commit 775a74f
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions tests/test_unit.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,21 @@ def base_cluster_365_days():

def test_cluster_with_null_duration(rng):
days = 365
args = {"unit_count": 10,
"nominal_power": 100,
"modulation": np.ones(dtype=float, shape=8760),
"fo_law": ProbabilityLaw.UNIFORM,
"fo_volatility": 0,
"po_law": ProbabilityLaw.UNIFORM,
"po_volatility": 0,
"fo_duration": 10 * np.ones(dtype=int, shape=days),
"fo_rate": 0.2 * np.zeros(dtype=float, shape=days),
"po_duration": 10 * np.ones(dtype=int, shape=days),
"po_rate": np.zeros(dtype=float, shape=days),
"npo_min": np.zeros(dtype=int, shape=days),
"npo_max": 10 * np.zeros(dtype=int, shape=days)
}
args = {
"unit_count": 10,
"nominal_power": 100,
"modulation": np.ones(dtype=float, shape=8760),
"fo_law": ProbabilityLaw.UNIFORM,
"fo_volatility": 0,
"po_law": ProbabilityLaw.UNIFORM,
"po_volatility": 0,
"fo_duration": 10 * np.ones(dtype=int, shape=days),
"fo_rate": 0.2 * np.zeros(dtype=float, shape=days),
"po_duration": 10 * np.ones(dtype=int, shape=days),
"po_rate": np.zeros(dtype=float, shape=days),
"npo_min": np.zeros(dtype=int, shape=days),
"npo_max": 10 * np.zeros(dtype=int, shape=days),
}
for duration_type in ["po_duration", "fo_duration"]:
args[duration_type] = 10 * np.zeros(dtype=int, shape=days)
with pytest.raises(ValueError, match="outage duration is null or negative on following days"):
Expand Down

0 comments on commit 775a74f

Please sign in to comment.