Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some more changes to make pytest-randomly happy #5719

Merged
merged 2 commits into from
Jun 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion networkx/classes/tests/test_subgraphviews.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest

import networkx as nx
from networkx.utils import edges_equal


class TestSubGraphView:
Expand Down Expand Up @@ -292,7 +293,9 @@ def test_correct_nodes(self):

def test_correct_edges(self):
"""Tests that the subgraph has the correct edges."""
assert [(0, 1, "edge01"), (3, 4, "edge34")] == sorted(self.H.edges.data("name"))
assert edges_equal(
[(0, 1, "edge01"), (3, 4, "edge34")], self.H.edges.data("name")
)

def test_add_node(self):
"""Tests that adding a node to the original graph does not
Expand All @@ -310,6 +313,7 @@ def test_remove_node(self):
"""
self.G.remove_node(0)
assert [1, 3, 4] == sorted(self.H.nodes)
self.G.add_node(0, name="node0")
self.G.add_edge(0, 1, name="edge01")

def test_node_attr_dict(self):
Expand Down