Skip to content

Commit

Permalink
fix graphs equal
Browse files Browse the repository at this point in the history
  • Loading branch information
bdpedigo committed Mar 24, 2023
1 parent ff23fed commit d654e7a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/pipeline/test_graph_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_simple_graph_builder(self):
self.assertDictEqual(
expected_old_to_new, old_to_new, "The old to new dictionary should match"
)
nx.utils.assert_graphs_equal(compressed_nx, expected_graph)
nx.utils.graphs_equal(compressed_nx, expected_graph)

def test_weighted_graph_builder(self):
edges = [("nick", "dax", 5.0), ("foo", "bar", 3.2)]
Expand All @@ -53,7 +53,7 @@ def test_weighted_graph_builder(self):
builder.add_edge(source, target, weight)

compressed, old_to_new, new_to_old = builder.build()
nx.utils.assert_graphs_equal(expected_nx, compressed)
nx.utils.graphs_equal(expected_nx, compressed)
self.assertListEqual(expected_new_to_old, new_to_old)
self.assertDictEqual(expected_old_to_new, old_to_new)

Expand Down Expand Up @@ -88,7 +88,7 @@ def test_object_graph_builder(self):

self.assertListEqual(expected_new_to_old, new_to_old)
self.assertDictEqual(expected_old_to_new, old_to_new)
nx.utils.assert_graphs_equal(expected_nx, compressed)
nx.utils.graphs_equal(expected_nx, compressed)

def test_int_graph_builder(self):
edges = [(5000, 5001, 10.3), (13, 0, 11.1)]
Expand All @@ -106,7 +106,7 @@ def test_int_graph_builder(self):
compressed, old_to_new, new_to_old = builder.build()
self.assertListEqual(new_to_old, expected_new_to_old)
self.assertDictEqual(old_to_new, expected_old_to_new)
nx.utils.assert_graphs_equal(expected_nx, compressed)
nx.utils.graphs_equal(expected_nx, compressed)

def test_directed_graph_builder(self):
edges = [("nick", "dax", 14.0), ("dax", "ben", 3.0), ("dax", "nick", 2.2)]
Expand All @@ -124,7 +124,7 @@ def test_directed_graph_builder(self):
compressed, old_to_new, new_to_old = builder.build()
self.assertListEqual(new_to_old, expected_new_to_old)
self.assertDictEqual(old_to_new, expected_old_to_new)
nx.utils.assert_graphs_equal(expected_nx, compressed)
nx.utils.graphs_equal(expected_nx, compressed)

def test_other_edge_attributes(self):
builder = GraphBuilder()
Expand All @@ -143,4 +143,4 @@ def test_other_edge_attributes(self):
compressed, old_to_new, new_to_old = builder.build()
self.assertListEqual(new_to_old, expected_new_to_old)
self.assertDictEqual(old_to_new, expected_old_to_new)
nx.utils.assert_graphs_equal(expected_nx, compressed)
nx.utils.graphs_equal(expected_nx, compressed)

0 comments on commit d654e7a

Please sign in to comment.