o
    ˷e/                     @   s  d Z ddlZddlZddlZddlZdd Zdd Zdd Zejd	d
dd Z	ejd	d
dd Z
zddlZd	ZW n eyE   dZY nw zddlZd	ZW n eyY   dZY nw zddlZd	ZW n eym   dZY nw zddlZd	ZW n ey   dZY nw zddlZd	ZW n ey   dZY nw zddlZd	ZW n ey   dZY nw zddlZd	ZW n ey   dZY nw zddlZd	ZW n ey   dZY nw zddlZd	ZW n ey   dZY nw g Zg dZg dZ dgZ!dgZ"dgZ#dgZ$dgZ%dgZ&dgZ'esee7 Zesee 7 Zesee!7 Zes!ee"7 Zes(ee#7 Zes/ee$7 Zes6ee%7 Zes=ee&7 ZesFee'7 ZdS dS )ax  
Testing
=======

General guidelines for writing good tests:

- doctests always assume ``import networkx as nx`` so don't add that
- prefer pytest fixtures over classes with setup methods.
- use the ``@pytest.mark.parametrize``  decorator
- use ``pytest.importorskip`` for numpy, scipy, pandas, and matplotlib b/c of PyPy.
  and add the module to the relevant entries below.

    Nc                 C   s   | j ddddd d S )N	--runslow
store_trueFzrun slow tests)actiondefaulthelp)	addoption)parser r	   H/var/www/ideatree/venv/lib/python3.10/site-packages/networkx/conftest.pypytest_addoption   s   
r   c                 C   s   |  dd d S )Nmarkerszslow: mark test as slow to run)addinivalue_line)configr	   r	   r
   pytest_configure   s   r   c                 C   s>   |  drd S tjjdd}|D ]}d|jv r|| qd S )Nr   zneed --runslow option to run)reasonslow)	getoptionpytestmarkskipkeywords
add_marker)r   items	skip_slowitemr	   r	   r
   pytest_collection_modifyitems    s   


r   T)autousec                   C   sD  t jdtdd t jdtdd t jdtdd t jdtdd t jdtdd t jdtdd t jdtd	d t jdtd
d t jdtdd t jdtdd t jdtdd t jdtdd t jdtdd t jdtdd t jdtdd t jdtdd t jdtdd t jdtdd t jdtdd t jdtdd t jdtdd t jdtdd t jdtdd t jdtdd t jdtdd t jdtdd t jdtdd t jdtdd t jdtdd t jdtd d t jdtd!d t jdtd"d t jdtd#d t jdtd$d t jdtd%d t jdtd&d t jdtd'd t jdtd(d t jdtd)d t jdtd*d t jdtd+d t jdtd,d t jdtd-d t jdtd.d t jdtd/d t jdtd)d t jdtd0d t jdtd1d t jdtd2d t jdtd3d t jdtd4d t jdtd5d t jdtd6d t jdtd7d t jdtd8d t jdtd9d t jdtd:d t jdtd;d t jdtd<d t jdtd=d t jdtd>d t jdtd?d t jdtd@d t jdtdAd t jdtdBd t jdtdCd t jdtdDd t jdtdEd d S )FNignorek_nearest_neighbors)categorymessagenumeric_mixing_matrixzOrdered.* is deprecatedz literal_stringizer is deprecatedz"literal_destringizer is deprecatedzis_string_like is deprecatedz
authority_matrixz
hub_matrixzdefault_opener is deprecatedzempty_generator is deprecatedzmake_str is deprecatedz"generate_unique_node is deprecatedz&context manager reversed is deprecatedz$This will return a generator in 3.0*betweenness_centrality_sourceedge_betweenesszthe matrix subclassto_numpy_matrixfrom_numpy_matrixznetworkx.pagerank_numpyznetworkx.pagerank_scipywrite_gpickleread_gpickle	write_shpread_shpedges_from_line
write_yaml	read_yamlzFilterAtlas.copyzFilterAdjacency.copyzFilterMultiAdjacency.copyzFilterMultiInner.copyjit_data	jit_graphconsumeziterable is deprecatedz%
The function signature for cytoscapez
The `attrs` keywordpreserve_random_statez`almost_equal`z`assert_nodes_equal`z`assert_edges_equal`z`assert_graphs_equal`znetworkx.hits_scipyznetworkx.hits_numpyz>google_matrix will return an np.ndarray instead of a np.matrixbiadjacency_matrixbethe_hessian_matrixincidence_matrixlaplacian_matrixnormalized_laplacian_matrixdirected_laplacian_matrix'directed_combinatorial_laplacian_matrixmodularity_matrixdirected_modularity_matrixadjacency_matrixz#

The scipy.sparse array containersznetworkx.projectz
find_coresattr_matrixz\n\nmake_small_.*to_numpy_recarrayinfoto_tuplezThe create_using argumentznx.nx_pydotz+

The `attrs` keyword argument of node_link)warningsfilterwarningsDeprecationWarningPendingDeprecationWarningFutureWarningr	   r	   r	   r
   set_warnings+   s  
rD   c                 C   s   t | d< d S )Nnx)networkx)doctest_namespacer	   r	   r
   add_nx   s   rH   F).algorithms/approximation/traveling_salesman.pyz/algorithms/centrality/current_flow_closeness.py*algorithms/node_classification/__init__.pyzalgorithms/non_randomness.pyz"algorithms/shortest_paths/dense.pylinalg/bethehessianmatrix.pyzlinalg/laplacianmatrix.pyzutils/misc.py)rI   z'algorithms/assortativity/correlation.pyz"algorithms/assortativity/mixing.pyz!algorithms/assortativity/pairs.pyzalgorithms/bipartite/matrix.pyz algorithms/bipartite/spectral.pyz1algorithms/centrality/current_flow_betweenness.pyz8algorithms/centrality/current_flow_betweenness_subset.pyz$algorithms/centrality/eigenvector.pyzalgorithms/centrality/katz.pyz%algorithms/centrality/second_order.pyz%algorithms/centrality/subgraph_alg.pyz!algorithms/communicability_alg.pyz$algorithms/link_analysis/hits_alg.pyz(algorithms/link_analysis/pagerank_alg.pyrJ   z%algorithms/node_classification/hmn.pyz%algorithms/node_classification/lgc.pyzalgorithms/similarity.pyconvert_matrix.pyzdrawing/layout.pyz"generators/spectral_graph_forge.pyzlinalg/algebraicconnectivity.pyzlinalg/attrmatrix.pyrK   zlinalg/graphmatrix.pyzlinalg/modularitymatrix.pyzlinalg/spectrum.pyzutils/rcm.pyzdrawing/nx_pylab.pyrL   zreadwrite/nx_yaml.pyzdrawing/nx_agraph.pyzdrawing/nx_pydot.pyzreadwrite/nx_shp.pyzalgorithms/polynomials.py)(__doc__sysr?   r   rF   r   r   r   fixturerD   rH   numpy	has_numpyImportErrorscipy	has_scipy
matplotlibhas_matplotlibpandas
has_pandas
pygraphvizhas_pygraphvizyamlhas_yamlpydot	has_pydotogrhas_ogrsympy	has_sympycollect_ignoreneeds_numpyneeds_scipyneeds_matplotlibneeds_pandas
needs_yamlneeds_pygraphvizneeds_pydot	needs_ogrneeds_sympyr	   r	   r	   r
   <module>   s    

 
R

