Skip to content

Commit

Permalink
added test for iteration in undirected value view
Browse files Browse the repository at this point in the history
  • Loading branch information
eileen-kuehn committed Jul 27, 2018
1 parent 17ded35 commit e83f4c9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions graphi_unittests/types_unittests/test_adjacency_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,10 @@ def test_value_view_undirected(self):
for value, node in enumerate(nodes):
graph[1:node] = value
value_view = graph.values()
for value in value_view:
self.assertIn(value, [0, 1, 2])
self.assertTrue(value in value_view)
self.assertFalse(3 in value_view)
self.assertEqual(len(nodes), len(value_view), "The number of values should be half for undirected graphs")

def test_value_view_directed(self):
Expand Down

0 comments on commit e83f4c9

Please sign in to comment.