diff options
author | DiamondJoseph <53935796+DiamondJoseph@users.noreply.github.com> | 2022-10-12 21:15:33 +0100 |
---|---|---|
committer | Jarrod Millman <jarrod.millman@gmail.com> | 2022-11-01 10:27:29 -0700 |
commit | ac13ea00737048ed14ae9fdbc5e16cd6bc762009 (patch) | |
tree | bd0c9cd750ee1760d64ae3e3f08fff79809ae6cc | |
parent | 56c5515c98d1d2e01b62e97e8d9718bd447011e5 (diff) | |
download | networkx-ac13ea00737048ed14ae9fdbc5e16cd6bc762009.tar.gz |
Add missing asserts to tests (#6039)
Fixes gh-5981: Add missing asserts to tests
5 files changed, 9 insertions, 9 deletions
diff --git a/networkx/readwrite/json_graph/tests/test_adjacency.py b/networkx/readwrite/json_graph/tests/test_adjacency.py index 48f34404..0f34ef19 100644 --- a/networkx/readwrite/json_graph/tests/test_adjacency.py +++ b/networkx/readwrite/json_graph/tests/test_adjacency.py @@ -10,7 +10,7 @@ class TestAdjacency: def test_graph(self): G = nx.path_graph(4) H = adjacency_graph(adjacency_data(G)) - nx.is_isomorphic(G, H) + assert nx.is_isomorphic(G, H) def test_graph_attributes(self): G = nx.path_graph(4) @@ -36,7 +36,7 @@ class TestAdjacency: nx.add_path(G, [1, 2, 3]) H = adjacency_graph(adjacency_data(G)) assert H.is_directed() - nx.is_isomorphic(G, H) + assert nx.is_isomorphic(G, H) def test_multidigraph(self): G = nx.MultiDiGraph() @@ -50,7 +50,7 @@ class TestAdjacency: G.add_edge(1, 2, key="first") G.add_edge(1, 2, key="second", color="blue") H = adjacency_graph(adjacency_data(G)) - nx.is_isomorphic(G, H) + assert nx.is_isomorphic(G, H) assert H[1][2]["second"]["color"] == "blue" def test_exception(self): diff --git a/networkx/readwrite/json_graph/tests/test_cytoscape.py b/networkx/readwrite/json_graph/tests/test_cytoscape.py index cdb101f9..e92e7373 100644 --- a/networkx/readwrite/json_graph/tests/test_cytoscape.py +++ b/networkx/readwrite/json_graph/tests/test_cytoscape.py @@ -27,7 +27,7 @@ def test_attrs_deprecation(recwarn): def test_graph(): G = nx.path_graph(4) H = cytoscape_graph(cytoscape_data(G)) - nx.is_isomorphic(G, H) + assert nx.is_isomorphic(G, H) def test_input_data_is_not_modified_when_building_graph(): @@ -69,7 +69,7 @@ def test_digraph(): nx.add_path(G, [1, 2, 3]) H = cytoscape_graph(cytoscape_data(G)) assert H.is_directed() - nx.is_isomorphic(G, H) + assert nx.is_isomorphic(G, H) def test_multidigraph(): diff --git a/networkx/readwrite/json_graph/tests/test_node_link.py b/networkx/readwrite/json_graph/tests/test_node_link.py index 28e12ded..8db06d45 100644 --- a/networkx/readwrite/json_graph/tests/test_node_link.py +++ b/networkx/readwrite/json_graph/tests/test_node_link.py @@ -107,7 +107,7 @@ class TestNodeLink: G.add_edge(1, 2, key="first") G.add_edge(1, 2, key="second", color="blue") H = node_link_graph(node_link_data(G)) - nx.is_isomorphic(G, H) + assert nx.is_isomorphic(G, H) assert H[1][2]["second"]["color"] == "blue" def test_graph_with_tuple_nodes(self): diff --git a/networkx/readwrite/json_graph/tests/test_tree.py b/networkx/readwrite/json_graph/tests/test_tree.py index ea19810e..59a81df7 100644 --- a/networkx/readwrite/json_graph/tests/test_tree.py +++ b/networkx/readwrite/json_graph/tests/test_tree.py @@ -13,7 +13,7 @@ def test_graph(): G.add_edge(1, 3, foo=10) G.add_edge(3, 4, foo=10) H = tree_graph(tree_data(G, 1)) - nx.is_isomorphic(G, H) + assert nx.is_isomorphic(G, H) def test_graph_attributes(): diff --git a/networkx/tests/test_relabel.py b/networkx/tests/test_relabel.py index c30475b1..9a86b386 100644 --- a/networkx/tests/test_relabel.py +++ b/networkx/tests/test_relabel.py @@ -180,10 +180,10 @@ class TestRelabel: K5 = nx.complete_graph(4) G = nx.complete_graph(4) G = nx.relabel_nodes(G, {i: i + 1 for i in range(4)}, copy=False) - nx.is_isomorphic(K5, G) + assert nx.is_isomorphic(K5, G) G = nx.complete_graph(4) G = nx.relabel_nodes(G, {i: i - 1 for i in range(4)}, copy=False) - nx.is_isomorphic(K5, G) + assert nx.is_isomorphic(K5, G) def test_relabel_selfloop(self): G = nx.DiGraph([(1, 1), (1, 2), (2, 3)]) |