diff options
| author | Mads Jensen <mje@inducks.org> | 2018-02-03 05:38:05 +0100 |
|---|---|---|
| committer | Dan Schult <dschult@colgate.edu> | 2018-02-02 23:38:05 -0500 |
| commit | f1e8e8bbfe9d324a2c3f46f28f7bb292ea78cc3b (patch) | |
| tree | 1467d7b7cf8757d5b4b59e9177a7ab58a37acb8d /networkx/algorithms | |
| parent | 36e5d54e74edd33260b4bea71c5e7ee114d094ea (diff) | |
| download | networkx-f1e8e8bbfe9d324a2c3f46f28f7bb292ea78cc3b.tar.gz | |
Deleted a duplicated test_random_graph in bipartite.tests.test_genera… (#2790)
* Deleted a duplicated test_random_graph in bipartite.tests.test_generators
* Renamed test_multigraphs_equal to test_multidigraphs_equal in test_utils
* Deleted a duplicated test_adjlist_digraph in test_adjlists in readwrite-tests
* Renamed a bunch of duplicated test names.
* Deleted a duplicate TestEdgelist.test_edgelist_digraph.
* Renamed a duplicate TestOpenFileDecorator.test_writer_kwarg_path.
* Fix the broken tests that used to be hidden by duplicate name
* Change list to sorted in test for py3.4 and py3.5
Diffstat (limited to 'networkx/algorithms')
5 files changed, 7 insertions, 7 deletions
diff --git a/networkx/algorithms/approximation/tests/test_kcomponents.py b/networkx/algorithms/approximation/tests/test_kcomponents.py index e3b0eff4..71fb8fed 100644 --- a/networkx/algorithms/approximation/tests/test_kcomponents.py +++ b/networkx/algorithms/approximation/tests/test_kcomponents.py @@ -214,7 +214,7 @@ class TestAntiGraph: def test_degree(self): for G, A in self.GA: - assert_equal(G.degree(), A.degree()) + assert_equal(sorted(G.degree()), sorted(A.degree())) def test_core_number(self): for G, A in self.GA: @@ -251,7 +251,7 @@ class TestAntiGraph: assert_raises(nx.NetworkXError, A.neighbors, node) assert_raises(nx.NetworkXError, G.neighbors, node) - def test_degree(self): + def test_degree_thingraph(self): for G, A in self.GA: node = list(G.nodes())[0] nodes = list(G.nodes())[1:4] diff --git a/networkx/algorithms/bipartite/tests/test_generators.py b/networkx/algorithms/bipartite/tests/test_generators.py index 4392bb21..5551c085 100644 --- a/networkx/algorithms/bipartite/tests/test_generators.py +++ b/networkx/algorithms/bipartite/tests/test_generators.py @@ -191,7 +191,7 @@ class TestGeneratorsBipartite(): assert_equal(set(range(n)), X) assert_equal(set(range(n, n + m)), Y) - def test_random_graph(self): + def test_random_digraph(self): n = 10 m = 20 G = random_graph(n, m, 0.9, directed=True) diff --git a/networkx/algorithms/flow/tests/test_maxflow.py b/networkx/algorithms/flow/tests/test_maxflow.py index 6cc63a6d..09df99fd 100644 --- a/networkx/algorithms/flow/tests/test_maxflow.py +++ b/networkx/algorithms/flow/tests/test_maxflow.py @@ -315,7 +315,7 @@ class TestMaxflowMinCutCommon: compare_flows_and_cuts(G, 's', 't', H, 97) - def test_digraph4(self): + def test_digraph5(self): # From ticket #429 by mfrasca. G = nx.DiGraph() G.add_edge('s', 'a', capacity=2) diff --git a/networkx/algorithms/shortest_paths/tests/test_dense_numpy.py b/networkx/algorithms/shortest_paths/tests/test_dense_numpy.py index 96aefbcf..a3e66ecf 100644 --- a/networkx/algorithms/shortest_paths/tests/test_dense_numpy.py +++ b/networkx/algorithms/shortest_paths/tests/test_dense_numpy.py @@ -23,14 +23,14 @@ class TestFloydNumpy(object): assert_equal(dist[0, 3], 3) assert_equal(dist[0, 4], 3) - def test_weighted_numpy(self): + def test_weighted_numpy_three_edges(self): XG3 = nx.Graph() XG3.add_weighted_edges_from([[0, 1, 2], [1, 2, 12], [2, 3, 1], [3, 4, 5], [4, 5, 1], [5, 0, 10]]) dist = nx.floyd_warshall_numpy(XG3) assert_equal(dist[0, 3], 15) - def test_weighted_numpy(self): + def test_weighted_numpy_two_edges(self): XG4 = nx.Graph() XG4.add_weighted_edges_from([[0, 1, 2], [1, 2, 2], [2, 3, 1], [3, 4, 1], [4, 5, 1], [5, 6, 1], diff --git a/networkx/algorithms/tests/test_cycles.py b/networkx/algorithms/tests/test_cycles.py index dabe0eb9..de7a5020 100644 --- a/networkx/algorithms/tests/test_cycles.py +++ b/networkx/algorithms/tests/test_cycles.py @@ -203,7 +203,7 @@ class TestFindCycle(object): x_ = [(1, 2, 0, FORWARD), (1, 2, 1, REVERSE)] assert_equal(x, x_) - def test_multidigraph_ignore2(self): + def test_multidigraph_original(self): # Node 2 doesn't need to be searched again from visited from 4. # The goal here is to cover the case when 2 to be researched from 4, # when 4 is visited from the first time (so we must make sure that 4 |
