running pytest running egg_info creating networkx.egg-info writing networkx.egg-info/PKG-INFO writing dependency_links to networkx.egg-info/dependency_links.txt writing requirements to networkx.egg-info/requires.txt writing top-level names to networkx.egg-info/top_level.txt writing manifest file 'networkx.egg-info/SOURCES.txt' reading manifest file 'networkx.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching '*.txt' under directory 'doc' warning: no files found matching '*.inc' under directory 'doc' warning: no previously-included files matching '*~' found anywhere in distribution warning: no previously-included files matching '*.pyc' found anywhere in distribution warning: no previously-included files matching '.svn' found anywhere in distribution no previously-included directories found matching 'doc/build' no previously-included directories found matching 'doc/auto_examples' no previously-included directories found matching 'doc/modules' no previously-included directories found matching 'doc/reference/generated' no previously-included directories found matching 'doc/reference/algorithms/generated' no previously-included directories found matching 'doc/reference/classes/generated' no previously-included directories found matching 'doc/reference/readwrite/generated' adding license file 'LICENSE.txt' writing manifest file 'networkx.egg-info/SOURCES.txt' running build_ext ============================= test session starts ============================== platform linux -- Python 3.10.1, pytest-6.2.5, py-1.11.0, pluggy-0.13.1 rootdir: /build/python-networkx/src/networkx-networkx-2.6.3 collected 4328 items / 27 skipped / 4301 selected networkx/algorithms/approximation/tests/test_approx_clust_coeff.py ..... [ 0%] . [ 0%] networkx/algorithms/approximation/tests/test_clique.py ........ [ 0%] networkx/algorithms/approximation/tests/test_connectivity.py ........... [ 0%] ....... [ 0%] networkx/algorithms/approximation/tests/test_distance_measures.py ...... [ 0%] .. [ 0%] networkx/algorithms/approximation/tests/test_dominating_set.py ... [ 0%] networkx/algorithms/approximation/tests/test_kcomponents.py ............ [ 1%] .... [ 1%] networkx/algorithms/approximation/tests/test_matching.py . [ 1%] networkx/algorithms/approximation/tests/test_maxcut.py ..... [ 1%] networkx/algorithms/approximation/tests/test_ramsey.py . [ 1%] networkx/algorithms/approximation/tests/test_steinertree.py .... [ 1%] networkx/algorithms/approximation/tests/test_traveling_salesman.py ..... [ 1%] ....................... [ 2%] networkx/algorithms/approximation/tests/test_treewidth.py ............ [ 2%] networkx/algorithms/approximation/tests/test_vertex_cover.py ... [ 2%] networkx/algorithms/assortativity/tests/test_connectivity.py ......... [ 2%] networkx/algorithms/assortativity/tests/test_mixing.py ................. [ 3%] .. [ 3%] networkx/algorithms/assortativity/tests/test_neighbor_degree.py ..... [ 3%] networkx/algorithms/assortativity/tests/test_pairs.py ........... [ 3%] networkx/algorithms/bipartite/tests/test_basic.py ............sss [ 3%] networkx/algorithms/bipartite/tests/test_centrality.py ...... [ 4%] networkx/algorithms/bipartite/tests/test_cluster.py ......... [ 4%] networkx/algorithms/bipartite/tests/test_covering.py .... [ 4%] networkx/algorithms/bipartite/tests/test_edgelist.py .............. [ 4%] networkx/algorithms/bipartite/tests/test_generators.py .......... [ 4%] networkx/algorithms/bipartite/tests/test_matching.py ............sssssss [ 5%] s [ 5%] networkx/algorithms/bipartite/tests/test_project.py ................. [ 5%] networkx/algorithms/bipartite/tests/test_redundancy.py ... [ 5%] networkx/algorithms/centrality/tests/test_betweenness_centrality.py .... [ 5%] ................................. [ 6%] networkx/algorithms/centrality/tests/test_betweenness_centrality_subset.py . [ 6%] ................ [ 7%] networkx/algorithms/centrality/tests/test_closeness_centrality.py ...... [ 7%] ....... [ 7%] networkx/algorithms/centrality/tests/test_degree_centrality.py ....... [ 7%] networkx/algorithms/centrality/tests/test_dispersion.py ... [ 7%] networkx/algorithms/centrality/tests/test_group.py ..................... [ 8%] ... [ 8%] networkx/algorithms/centrality/tests/test_harmonic_centrality.py ....... [ 8%] ...... [ 8%] networkx/algorithms/centrality/tests/test_katz_centrality.py ..........s [ 8%] ssssssssss..sss [ 9%] networkx/algorithms/centrality/tests/test_load_centrality.py ........... [ 9%] ...... [ 9%] networkx/algorithms/centrality/tests/test_percolation_centrality.py ... [ 9%] networkx/algorithms/centrality/tests/test_reaching.py .............. [ 9%] networkx/algorithms/centrality/tests/test_voterank.py ..... [ 10%] networkx/algorithms/coloring/tests/test_coloring.py ................ [ 10%] networkx/algorithms/community/tests/test_asyn_fluid.py ..... [ 10%] networkx/algorithms/community/tests/test_centrality.py ..... [ 10%] networkx/algorithms/community/tests/test_kclique.py ........ [ 10%] networkx/algorithms/community/tests/test_kernighan_lin.py ........ [ 10%] networkx/algorithms/community/tests/test_label_propagation.py .......... [ 11%] . [ 11%] networkx/algorithms/community/tests/test_lukes.py .... [ 11%] networkx/algorithms/community/tests/test_modularity_max.py ............. [ 11%] .. [ 11%] networkx/algorithms/community/tests/test_quality.py ....... [ 11%] networkx/algorithms/community/tests/test_utils.py .... [ 11%] networkx/algorithms/components/tests/test_attracting.py .... [ 12%] networkx/algorithms/components/tests/test_biconnected.py ............. [ 12%] networkx/algorithms/components/tests/test_connected.py ........ [ 12%] networkx/algorithms/components/tests/test_semiconnected.py ........ [ 12%] networkx/algorithms/components/tests/test_strongly_connected.py ........ [ 12%] ...... [ 13%] networkx/algorithms/components/tests/test_weakly_connected.py ...... [ 13%] networkx/algorithms/connectivity/tests/test_connectivity.py ............ [ 13%] ...................... [ 13%] networkx/algorithms/connectivity/tests/test_cuts.py .................... [ 14%] . [ 14%] networkx/algorithms/connectivity/tests/test_disjoint_paths.py .......... [ 14%] ........ [ 14%] networkx/algorithms/connectivity/tests/test_edge_augmentation.py ....... [ 15%] ............. [ 15%] networkx/algorithms/connectivity/tests/test_edge_kcomponents.py ........ [ 15%] ............. [ 15%] networkx/algorithms/connectivity/tests/test_kcomponents.py .sss...... [ 16%] networkx/algorithms/connectivity/tests/test_kcutsets.py s........s..... [ 16%] networkx/algorithms/connectivity/tests/test_stoer_wagner.py ..... [ 16%] networkx/algorithms/flow/tests/test_gomory_hu.py ....s.... [ 16%] networkx/algorithms/flow/tests/test_maxflow.py ......................... [ 17%] .. [ 17%] networkx/algorithms/flow/tests/test_maxflow_large_graph.py ...s.. [ 17%] networkx/algorithms/flow/tests/test_mincost.py ................... [ 17%] networkx/algorithms/flow/tests/test_networksimplex.py .................. [ 18%] .... [ 18%] networkx/algorithms/isomorphism/tests/test_ismags.py .......... [ 18%] networkx/algorithms/isomorphism/tests/test_isomorphism.py .... [ 18%] networkx/algorithms/isomorphism/tests/test_isomorphvf2.py .............. [ 19%] . [ 19%] networkx/algorithms/isomorphism/tests/test_match_helpers.py .. [ 19%] networkx/algorithms/isomorphism/tests/test_temporalisomorphvf2.py ...... [ 19%] ...... [ 19%] networkx/algorithms/isomorphism/tests/test_tree_isomorphism.py ..... [ 19%] networkx/algorithms/isomorphism/tests/test_vf2userfunc.py .............. [ 19%] .............. [ 20%] networkx/algorithms/minors/tests/test_contraction.py ................... [ 20%] ............ [ 20%] networkx/algorithms/operators/tests/test_all.py .................. [ 21%] networkx/algorithms/operators/tests/test_binary.py .................... [ 21%] networkx/algorithms/operators/tests/test_product.py .................... [ 22%] ....... [ 22%] networkx/algorithms/operators/tests/test_unary.py ... [ 22%] networkx/algorithms/shortest_paths/tests/test_astar.py ............. [ 22%] networkx/algorithms/shortest_paths/tests/test_dense.py ........ [ 22%] networkx/algorithms/shortest_paths/tests/test_dense_numpy.py ....... [ 23%] networkx/algorithms/shortest_paths/tests/test_generic.py ............... [ 23%] ....... [ 23%] networkx/algorithms/shortest_paths/tests/test_unweighted.py ............ [ 23%] [ 23%] networkx/algorithms/shortest_paths/tests/test_weighted.py .............. [ 24%] ............................ [ 24%] networkx/algorithms/tests/test_asteroidal.py . [ 24%] networkx/algorithms/tests/test_boundary.py ............. [ 25%] networkx/algorithms/tests/test_bridges.py ..... [ 25%] networkx/algorithms/tests/test_chains.py .... [ 25%] networkx/algorithms/tests/test_chordal.py .......... [ 25%] networkx/algorithms/tests/test_clique.py ............. [ 25%] networkx/algorithms/tests/test_cluster.py .............................. [ 26%] .......... [ 26%] networkx/algorithms/tests/test_core.py .............. [ 27%] networkx/algorithms/tests/test_covering.py ........ [ 27%] networkx/algorithms/tests/test_cuts.py ................. [ 27%] networkx/algorithms/tests/test_cycles.py ............................... [ 28%] ... [ 28%] networkx/algorithms/tests/test_d_separation.py ............. [ 28%] networkx/algorithms/tests/test_dag.py .................................. [ 29%] .................. [ 30%] networkx/algorithms/tests/test_distance_measures.py .............sssssss [ 30%] ssssss.... [ 30%] networkx/algorithms/tests/test_distance_regular.py ....... [ 30%] networkx/algorithms/tests/test_dominance.py ...................... [ 31%] networkx/algorithms/tests/test_dominating.py ..... [ 31%] networkx/algorithms/tests/test_efficiency.py ....... [ 31%] networkx/algorithms/tests/test_euler.py .............................. [ 32%] networkx/algorithms/tests/test_graph_hashing.py ... [ 32%] networkx/algorithms/tests/test_graphical.py ............. [ 32%] networkx/algorithms/tests/test_hierarchy.py ..... [ 32%] networkx/algorithms/tests/test_hybrid.py .. [ 32%] networkx/algorithms/tests/test_isolate.py ... [ 32%] networkx/algorithms/tests/test_link_prediction.py ...................... [ 33%] .......................................... [ 34%] networkx/algorithms/tests/test_lowest_common_ancestors.py .............. [ 34%] .......... [ 35%] networkx/algorithms/tests/test_matching.py ............................. [ 35%] ............. [ 35%] networkx/algorithms/tests/test_max_weight_clique.py ..... [ 36%] networkx/algorithms/tests/test_mis.py ........ [ 36%] networkx/algorithms/tests/test_moral.py . [ 36%] networkx/algorithms/tests/test_non_randomness.py ... [ 36%] networkx/algorithms/tests/test_planar_drawing.py ............ [ 36%] networkx/algorithms/tests/test_planarity.py ............................ [ 37%] .. [ 37%] networkx/algorithms/tests/test_reciprocity.py ..... [ 37%] networkx/algorithms/tests/test_regular.py ............. [ 37%] networkx/algorithms/tests/test_richclub.py ........ [ 37%] networkx/algorithms/tests/test_similarity.py sssssssssssssssssssssssssss [ 38%] sssssssssssssssssssss [ 39%] networkx/algorithms/tests/test_simple_paths.py ......................... [ 39%] ................................................ [ 40%] networkx/algorithms/tests/test_smallworld.py .... [ 40%] networkx/algorithms/tests/test_smetric.py .. [ 40%] networkx/algorithms/tests/test_sparsifiers.py ....... [ 41%] networkx/algorithms/tests/test_structuralholes.py ............ [ 41%] networkx/algorithms/tests/test_summarization.py ................. [ 41%] networkx/algorithms/tests/test_swap.py ............. [ 42%] networkx/algorithms/tests/test_threshold.py ................s. [ 42%] networkx/algorithms/tests/test_tournament.py ...............F..... [ 42%] networkx/algorithms/tests/test_triads.py ........ [ 43%] networkx/algorithms/tests/test_vitality.py ...... [ 43%] networkx/algorithms/tests/test_voronoi.py .......... [ 43%] networkx/algorithms/tests/test_wiener.py .... [ 43%] networkx/algorithms/traversal/tests/test_beamsearch.py .. [ 43%] networkx/algorithms/traversal/tests/test_bfs.py ........... [ 43%] networkx/algorithms/traversal/tests/test_dfs.py ................. [ 44%] networkx/algorithms/traversal/tests/test_edgebfs.py ................ [ 44%] networkx/algorithms/traversal/tests/test_edgedfs.py ............... [ 44%] networkx/algorithms/tree/tests/test_branchings.py ...................... [ 45%] . [ 45%] networkx/algorithms/tree/tests/test_coding.py .............. [ 45%] networkx/algorithms/tree/tests/test_decomposition.py ..... [ 45%] networkx/algorithms/tree/tests/test_mst.py ............................. [ 46%] ............... [ 46%] networkx/algorithms/tree/tests/test_operations.py ... [ 47%] networkx/algorithms/tree/tests/test_recognition.py ..................... [ 47%] .... [ 47%] networkx/classes/tests/test_coreviews.py ............................... [ 48%] .......................... [ 48%] networkx/classes/tests/test_digraph.py ................................. [ 49%] ............................................... [ 50%] networkx/classes/tests/test_digraph_historical.py ...................... [ 51%] .................... [ 51%] networkx/classes/tests/test_filters.py ........... [ 51%] networkx/classes/tests/test_function.py ................................ [ 52%] .................................... [ 53%] networkx/classes/tests/test_graph.py ................................... [ 54%] ........................... [ 54%] networkx/classes/tests/test_graph_historical.py ........................ [ 55%] .......... [ 55%] networkx/classes/tests/test_graphviews.py .............................. [ 56%] ..... [ 56%] networkx/classes/tests/test_multidigraph.py ............................ [ 57%] ................................................................. [ 58%] networkx/classes/tests/test_multigraph.py .............................. [ 59%] ................................................ [ 60%] networkx/classes/tests/test_ordered.py ..... [ 60%] networkx/classes/tests/test_reportviews.py ............................. [ 61%] ........................................................................ [ 62%] ........................................................................ [ 64%] ................................................................ [ 66%] networkx/classes/tests/test_special.py ................................. [ 66%] ........................................................................ [ 68%] ........................................................................ [ 70%] ........................................................................ [ 71%] ........................................................................ [ 73%] ........................................................................ [ 75%] ........................................................................ [ 76%] ........................................................................ [ 78%] ........................................................................ [ 80%] ... [ 80%] networkx/classes/tests/test_subgraphviews.py ........................... [ 80%] ..... [ 81%] networkx/generators/tests/test_atlas.py ........ [ 81%] networkx/generators/tests/test_classic.py .............................. [ 81%] [ 81%] networkx/generators/tests/test_cographs.py . [ 81%] networkx/generators/tests/test_community.py ................ [ 82%] networkx/generators/tests/test_degree_seq.py ................... [ 82%] networkx/generators/tests/test_directed.py ........ [ 82%] networkx/generators/tests/test_duplication.py ....... [ 83%] networkx/generators/tests/test_ego.py .. [ 83%] networkx/generators/tests/test_expanders.py s... [ 83%] networkx/generators/tests/test_geometric.py ....................... [ 83%] networkx/generators/tests/test_harary_graph.py .. [ 83%] networkx/generators/tests/test_internet_as_graphs.py ..... [ 83%] networkx/generators/tests/test_intersection.py .... [ 83%] networkx/generators/tests/test_interval_graph.py ........ [ 84%] networkx/generators/tests/test_joint_degree_seq.py .... [ 84%] networkx/generators/tests/test_lattice.py ...................... [ 84%] networkx/generators/tests/test_line.py ............................ [ 85%] networkx/generators/tests/test_mycielski.py ... [ 85%] networkx/generators/tests/test_nonisomorphic_trees.py ..... [ 85%] networkx/generators/tests/test_random_clustered.py .... [ 85%] networkx/generators/tests/test_random_graphs.py ........ [ 85%] networkx/generators/tests/test_small.py ... [ 85%] networkx/generators/tests/test_stochastic.py ...... [ 86%] networkx/generators/tests/test_sudoku.py ...... [ 86%] networkx/generators/tests/test_trees.py ....... [ 86%] networkx/generators/tests/test_triads.py .. [ 86%] networkx/linalg/tests/test_algebraic_connectivity.py ssss............sss [ 86%] sssssssssssssssssssssssssssssss.........ssssssssssssssssssssssssssss [ 88%] networkx/linalg/tests/test_attrmatrix.py ...ss [ 88%] networkx/readwrite/json_graph/tests/test_adjacency.py ...... [ 88%] networkx/readwrite/json_graph/tests/test_cytoscape.py ........ [ 88%] networkx/readwrite/json_graph/tests/test_jit.py ..... [ 89%] networkx/readwrite/json_graph/tests/test_node_link.py ......... [ 89%] networkx/readwrite/json_graph/tests/test_tree.py .... [ 89%] networkx/readwrite/tests/test_adjlist.py .................. [ 89%] networkx/readwrite/tests/test_edgelist.py ......................... [ 90%] networkx/readwrite/tests/test_getattr_nxyaml_removal.py .... [ 90%] networkx/readwrite/tests/test_gexf.py ..................... [ 90%] networkx/readwrite/tests/test_gml.py .................... [ 91%] networkx/readwrite/tests/test_gpickle.py .. [ 91%] networkx/readwrite/tests/test_graph6.py ............... [ 91%] networkx/readwrite/tests/test_graphml.py ............................... [ 92%] ........................... [ 93%] networkx/readwrite/tests/test_leda.py .. [ 93%] networkx/readwrite/tests/test_p2g.py ... [ 93%] networkx/readwrite/tests/test_pajek.py ........ [ 93%] networkx/readwrite/tests/test_sparse6.py ................ [ 93%] networkx/readwrite/tests/test_text.py ....... [ 93%] networkx/testing/tests/test_utils.py ..................... [ 94%] networkx/tests/test_all_random_functions.py s [ 94%] networkx/tests/test_convert.py ............... [ 94%] networkx/tests/test_convert_numpy.py ..............s.................... [ 95%] ............ [ 95%] networkx/tests/test_convert_pandas.py ...................... [ 96%] networkx/tests/test_exceptions.py ....... [ 96%] networkx/tests/test_import.py .. [ 96%] networkx/tests/test_relabel.py ....................... [ 97%] networkx/utils/tests/test__init.py . [ 97%] networkx/utils/tests/test_contextmanager.py . [ 97%] networkx/utils/tests/test_decorators.py ................................ [ 97%] ... [ 97%] networkx/utils/tests/test_heaps.py .. [ 97%] networkx/utils/tests/test_mapped_queue.py .............................. [ 98%] .......... [ 98%] networkx/utils/tests/test_misc.py .................................... [ 99%] networkx/utils/tests/test_random_sequence.py .... [ 99%] networkx/utils/tests/test_rcm.py .. [ 99%] networkx/utils/tests/test_unionfind.py ..... [100%] =================================== FAILURES =================================== ____________________________ test_tournament_matrix ____________________________ def test_tournament_matrix(): np = pytest.importorskip("numpy") npt = pytest.importorskip("numpy.testing") G = DiGraph([(0, 1)]) > m = tournament_matrix(G) networkx/algorithms/tests/test_tournament.py:125: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ networkx/utils/decorators.py:795: in func return argmap._lazy_compile(__wrapper)(*args, **kwargs) compilation 1078:5: in argmap_tournament_matrix_1074 ??? networkx/algorithms/tournament.py:230: in tournament_matrix A = nx.adjacency_matrix(G) networkx/linalg/graphmatrix.py:157: in adjacency_matrix return nx.to_scipy_sparse_matrix(G, nodelist=nodelist, dtype=dtype, weight=weight) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ G = , nodelist = None dtype = None, weight = 'weight', format = 'csr' def to_scipy_sparse_matrix(G, nodelist=None, dtype=None, weight="weight", format="csr"): """Returns the graph adjacency matrix as a SciPy sparse matrix. Parameters ---------- G : graph The NetworkX graph used to construct the sparse matrix. nodelist : list, optional The rows and columns are ordered according to the nodes in `nodelist`. If `nodelist` is None, then the ordering is produced by G.nodes(). dtype : NumPy data-type, optional A valid NumPy dtype used to initialize the array. If None, then the NumPy default is used. weight : string or None optional (default='weight') The edge attribute that holds the numerical value used for the edge weight. If None then all edge weights are 1. format : str in {'bsr', 'csr', 'csc', 'coo', 'lil', 'dia', 'dok'} The type of the matrix to be returned (default 'csr'). For some algorithms different implementations of sparse matrices can perform better. See [1]_ for details. Returns ------- M : SciPy sparse matrix Graph adjacency matrix. Notes ----- For directed graphs, matrix entry i,j corresponds to an edge from i to j. The matrix entries are populated using the edge attribute held in parameter weight. When an edge does not have that attribute, the value of the entry is 1. For multiple edges the matrix values are the sums of the edge weights. When `nodelist` does not contain every node in `G`, the adjacency matrix is built from the subgraph of `G` that is induced by the nodes in `nodelist`. The convention used for self-loop edges in graphs is to assign the diagonal matrix entry value to the weight attribute of the edge (or the number 1 if the edge has no weight attribute). If the alternate convention of doubling the edge weight is desired the resulting Scipy sparse matrix can be modified as follows: >>> G = nx.Graph([(1, 1)]) >>> A = nx.to_scipy_sparse_matrix(G) >>> print(A.todense()) [[1]] >>> A.setdiag(A.diagonal() * 2) >>> print(A.todense()) [[2]] Examples -------- >>> G = nx.MultiDiGraph() >>> G.add_edge(0, 1, weight=2) 0 >>> G.add_edge(1, 0) 0 >>> G.add_edge(2, 2, weight=3) 0 >>> G.add_edge(2, 2) 1 >>> S = nx.to_scipy_sparse_matrix(G, nodelist=[0, 1, 2]) >>> print(S.todense()) [[0 2 0] [1 0 0] [0 0 4]] References ---------- .. [1] Scipy Dev. References, "Sparse Matrices", https://docs.scipy.org/doc/scipy/reference/sparse.html """ > import scipy as sp E ModuleNotFoundError: No module named 'scipy' networkx/convert_matrix.py:851: ModuleNotFoundError =============================== warnings summary =============================== networkx/utils/decorators.py:289 /build/python-networkx/src/networkx-networkx-2.6.3/networkx/utils/decorators.py:289: DeprecationWarning: preserve_random_state is deprecated and will be removed in 3.0. warnings.warn(msg, DeprecationWarning) networkx/classes/tests/test_ordered.py::TestOrderedFeatures::test_subgraph_order /build/python-networkx/src/networkx-networkx-2.6.3/networkx/classes/tests/test_ordered.py:22: DeprecationWarning: OrderedDiGraph is deprecated and will be removed in version 3.0. Use `DiGraph` instead, which guarantees order is preserved for Python >= 3.7 cls.G = nx.OrderedDiGraph() networkx/generators/tests/test_random_graphs.py: 4830 warnings /build/python-networkx/src/networkx-networkx-2.6.3/networkx/generators/random_graphs.py:227: DeprecationWarning: non-integer arguments to randrange() have been deprecated since Python 3.10 and will be removed in a subsequent version if seed.randrange(mmax - t) < m - k: -- Docs: https://docs.pytest.org/en/stable/warnings.html =========================== short test summary info ============================ FAILED networkx/algorithms/tests/test_tournament.py::test_tournament_matrix ==== 1 failed, 4162 passed, 192 skipped, 4832 warnings in 610.19s (0:10:10) ==== ==> ERROR: A failure occurred in check().  Aborting...