Skip to content

Commit

Permalink
update remove_nodes tests for better coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Robbybp committed Apr 3, 2024
1 parent 025e429 commit c7db40f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyomo/contrib/incidence_analysis/tests/test_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -1466,7 +1466,10 @@ def test_remove_bad_node(self):
with self.assertRaisesRegex(KeyError, "does not exist"):
# Suppose we think something like this should work. We should get
# an error, and not silently do nothing.
igraph.remove_nodes([m.x], [m.eq])
igraph.remove_nodes([m.x], [m.eq[1]])

with self.assertRaisesRegex(KeyError, "does not exist"):
igraph.remove_nodes(None, [m.eq])

with self.assertRaisesRegex(KeyError, "does not exist"):
igraph.remove_nodes([[m.x[1], m.x[2]], [m.eq[1]]])
Expand Down

0 comments on commit c7db40f

Please sign in to comment.