diff options
| author | Jeffrey Finkelstein <jeffrey.finkelstein@gmail.com> | 2015-05-20 22:43:28 -0400 |
|---|---|---|
| committer | Mridul Seth <seth.mridul@gmail.com> | 2015-06-11 23:55:58 +0530 |
| commit | 203295422d6f57ed4cb4c523057a4fa53e4485fc (patch) | |
| tree | 821e591f3701106f5256775071a33d0021a6e29e /networkx/algorithms/components/tests | |
| parent | d49733b61fb7dedfbbbdd9c04464adf6beb5db07 (diff) | |
| download | networkx-203295422d6f57ed4cb4c523057a4fa53e4485fc.tar.gz | |
Makes Graph.nodes() return iterator instead of list
Previously `Graph.nodes()` returned a list of nodes and
`Graph.nodes_iter()` returned an iterator over nodes. With this commit,
the former function now returns an iterator and the latter no longer
exists.
Diffstat (limited to 'networkx/algorithms/components/tests')
| -rw-r--r-- | networkx/algorithms/components/tests/test_strongly_connected.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/networkx/algorithms/components/tests/test_strongly_connected.py b/networkx/algorithms/components/tests/test_strongly_connected.py index 5460d624..4a8bf89a 100644 --- a/networkx/algorithms/components/tests/test_strongly_connected.py +++ b/networkx/algorithms/components/tests/test_strongly_connected.py @@ -116,7 +116,7 @@ class TestStronglyConnected: G.add_edge(4, 3) scc = list(nx.strongly_connected_components(G)) cG = nx.condensation(G, scc) - assert_equal(cG.nodes(), [0, 1]) + assert_equal(sorted(cG.nodes()), [0, 1]) if 1 in scc[0]: edge = (0, 1) else: |
