def test_making_edge_list(self) -> None: """Can we make networkx-friendly edge lists?""" tests = [ ([1, 2], [(1, 2)]), ([1, 2, 3], [(1, 2), (2, 3)]), ([1, 2, 3, 4], [(1, 2), (2, 3), (3, 4)]), ] for q, a in tests: self.assertEqual(make_edge_list(q), a)
def test_making_edge_list(self): """Can we make networkx-friendly edge lists?""" tests = [ ([1, 2], [(1, 2)]), ([1, 2, 3], [(1, 2), (2, 3)]), ([1, 2, 3, 4], [(1, 2), (2, 3), (3, 4)]), ] for q, a in tests: self.assertEqual( make_edge_list(q), a, )
def test_making_edge_list(self) -> None: """Can we make network-friendly edge lists?""" tests = [ ([1, 2], [(1, 2)]), ([1, 2, 3], [(1, 2), (2, 3)]), ([1, 2, 3, 4], [(1, 2), (2, 3), (3, 4)]), ] for q, a in tests: with self.subTest( f"Testing network-friendly edge creation for: {q}...", q=q, a=a, ): self.assertEqual(make_edge_list(q), a)