From 5ae69341adc323407d1969571d5b14b855b389fd Mon Sep 17 00:00:00 2001 From: joda9 Date: Wed, 4 Sep 2024 10:23:48 +0200 Subject: [PATCH] adjusting test parametrization --- tests/network/test_topology.py | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/tests/network/test_topology.py b/tests/network/test_topology.py index 8bac2dc66..140d4b3c0 100644 --- a/tests/network/test_topology.py +++ b/tests/network/test_topology.py @@ -1981,25 +1981,15 @@ def test_find_meshes(self, caplog: pytest.LogCaptureFixture): assert "Bus_BranchTee_LVGrid_2_3" in meshes[1] assert "Grid contains mesh(es)." in caplog.text - # Define the parameters - sector_values = ["home", "work"] - comp_type_values = ["charging_point", "heat_pump", "storage_unit", "generator"] - voltage_level_values = [6, 7] - max_distance_from_target_bus_values = [0.01] - allowed_number_of_comp_per_bus_values = [2] - allow_mv_connection_values = [True, False] - # Parametrize the test function - @pytest.mark.parametrize("sector", sector_values) - @pytest.mark.parametrize("comp_type", comp_type_values) - @pytest.mark.parametrize("voltage_level", voltage_level_values) - @pytest.mark.parametrize( - "max_distance_from_target_bus", max_distance_from_target_bus_values - ) + @pytest.mark.parametrize("sector", ["home", "work"]) @pytest.mark.parametrize( - "allowed_number_of_comp_per_bus", allowed_number_of_comp_per_bus_values + "comp_type", ["charging_point", "heat_pump", "storage_unit", "generator"] ) - @pytest.mark.parametrize("allow_mv_connection", allow_mv_connection_values) + @pytest.mark.parametrize("voltage_level", [6, 7]) + @pytest.mark.parametrize("max_distance_from_target_bus", [0.01]) + @pytest.mark.parametrize("allowed_number_of_comp_per_bus", [2]) + @pytest.mark.parametrize("allow_mv_connection", [True, False]) def test_connect_to_lv_based_on_geolocation_parametrized( self, sector,