Skip to content

Commit

Permalink
added test_empty_graph_reversal
Browse files Browse the repository at this point in the history
  • Loading branch information
matanco64 committed Apr 5, 2023
1 parent e653082 commit b071f44
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/rustworkx_tests/digraph/test_edges.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,3 +988,8 @@ def test_reverse_large_graph(self):
graph.reverse_inplace()
reversed_edge_list = [(d, s) for s, d in edge_list]
self.assertEqual(reversed_edge_list, graph.edge_list())

def test_empty_graph_reversal(self):
graph = rustworkx.PyDiGraph()
graph.reverse_inplace()
self.assertEqual([], graph.edge_list())

0 comments on commit b071f44

Please sign in to comment.