Skip to content

Commit

Permalink
Add to test
Browse files Browse the repository at this point in the history
  • Loading branch information
birgits committed Dec 18, 2023
1 parent cae037e commit 402ab33
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/network/test_topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -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() == [
Expand All @@ -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() == [
Expand Down

0 comments on commit 402ab33

Please sign in to comment.