From 402ab33b92ff26a7a2ef0e4b6e51c0f471111799 Mon Sep 17 00:00:00 2001 From: birgits Date: Sun, 17 Dec 2023 16:04:38 -0800 Subject: [PATCH] Add to test --- tests/network/test_topology.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/network/test_topology.py b/tests/network/test_topology.py index 6c9b41d7..0baf02f3 100644 --- a/tests/network/test_topology.py +++ b/tests/network/test_topology.py @@ -875,6 +875,7 @@ def test_to_csv(self): def test_assign_feeders(self): # Test mode 'grid_feeder' self.topology.assign_feeders(mode="grid_feeder") + # check specific values assert self.topology.buses_df.loc[ ["Bus_MVStation_1", "Bus_Generator_1"], "grid_feeder" ].to_list() == [ @@ -887,9 +888,13 @@ def test_assign_feeders(self): "Bus_BranchTee_MVGrid_1_1", "Bus_BranchTee_MVGrid_1_4", ] + # check that all buses and lines have a grid feeder assigned + assert not self.topology.lines_df.grid_feeder.isna().any() + assert not self.topology.buses_df.grid_feeder.isna().any() # test mode 'mv_feeder' self.topology.assign_feeders(mode="mv_feeder") + # check specific values assert self.topology.buses_df.loc[ ["Bus_MVStation_1", "Bus_Generator_1"], "mv_feeder" ].to_list() == [