Skip to content

Commit

Permalink
adjusting test parametrization
Browse files Browse the repository at this point in the history
  • Loading branch information
joda9 committed Sep 4, 2024
1 parent 744535a commit 5ae6934
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions tests/network/test_topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 5ae6934

Please sign in to comment.