From 775a74f78c2c3d933f623e9a4325a77e5447371e Mon Sep 17 00:00:00 2001 From: belthlemar Date: Tue, 22 Oct 2024 13:32:10 +0200 Subject: [PATCH] fix typing --- tests/test_unit.py | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/tests/test_unit.py b/tests/test_unit.py index 2df82ba..ad538f7 100644 --- a/tests/test_unit.py +++ b/tests/test_unit.py @@ -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"):