Skip to content

Commit

Permalink
test: update _identify_mesh_branch test case to detect bug
Browse files Browse the repository at this point in the history
  • Loading branch information
danielolsen committed Apr 7, 2020
1 parent fa3769e commit 6826b6a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion powersimdata/input/tests/test_design_transmission.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ class TestIdentifyMesh(unittest.TestCase):
def setUp(self):
# Build dummy congu and congl dataframes, containing barrier cruft
num_hours = 100
num_branches = len(mock_branch['branch_id'])
branch_indices = mock_branch['branch_id']
num_branches = len(branch_indices)
congu_data = np.ones((num_hours, num_branches)) * 1e-9
congl_data = np.ones((num_hours, num_branches)) * 1e-10
columns = mock_branch['branch_id']
Expand All @@ -129,6 +130,8 @@ def setUp(self):
# Branch 103 will have only occassional congestion, but very high
congu[103].iloc[10:13] = 20
congl[103].iloc[20:23] = 30
# Build dummy change table
ct = {'branch': {'branch_id': {b: 1 for b in branch_indices}}}

# Finally, combine all of this into a MockScenario
self.mock_scenario = MockScenario(
Expand All @@ -139,6 +142,7 @@ def setUp(self):
},
congu=congu,
congl=congl,
ct=ct,
)

# These tests use the default 'branch' ranking: [103, 102, 101]
Expand Down

0 comments on commit 6826b6a

Please sign in to comment.