
    Gd                     b   d Z ddlZddlZddlZddlZd Zd Zd Z ej        d          d             Z	 ej        d          d	             Z
	 ddlZdZn# e$ r d
ZY nw xY w	 ddlZdZn# e$ r d
ZY nw xY w	 ddlZdZn# e$ r d
ZY nw xY w	 ddlZdZn# e$ r d
ZY nw xY w	 ddlZdZn# e$ r d
ZY nw xY w	 ddlZdZn# e$ r d
ZY nw xY w	 ddlZdZn# e$ r d
ZY nw xY wg Zg dZg dZdgZdgZdgZdgZ dgZ!eseez  Zeseez  Zeseez  Zeseez  Zeseez  Zesee z  Zesee!z  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                 8    |                      dddd           d S )N	--runslow
store_trueFzrun slow tests)actiondefaulthelp)	addoption)parsers    1lib/python3.11/site-packages/networkx/conftest.pypytest_addoptionr      s3    
L%>N          c                 2    |                      dd           d S )Nmarkerszslow: mark test as slow to run)addinivalue_line)configs    r   pytest_configurer      s    
I'GHHHHHr   c                    t           j        j                            |           |                     d          rd S t
          j                            d          }|D ] }d|j        v r|	                    |           !d S )Nr   zneed --runslow option to run)reasonslow)
networkxclassesbackends_mark_tests	getoptionpytestmarkskipkeywords
add_marker)r   items	skip_slowitems       r   pytest_collection_modifyitemsr#       s     ))%000$$   (F GGI ' 'T]""OOI&&&' 'r   T)autousec                     t          j        dt          d           t          j        dt          d           t          j        dt          d           t          j        dt          d           t          j        dt          d           t          j        dt          d           t          j        dt          d	           t          j        dt          d
           d S )Nignorez literal_stringizer is deprecated)categorymessagez"literal_destringizer is deprecatedzThe create_using argumentznx.nx_pydotz+

The `attrs` keyword argument of node_linkz'single_target_shortest_path_length willzshortest_path for all_pairsz
forest_str is deprecated)warningsfilterwarningsDeprecationWarning r   r   set_warningsr-   /   s1   #2   
 #4    -7R    -}    #?   
 #9   
 #-   
 -7S     r   c                     t           | d<   d S )Nnx)r   )doctest_namespaces    r   add_nxr1   V   s    &dr   F)	.algorithms/approximation/traveling_salesman.pyz/algorithms/centrality/current_flow_closeness.py!algorithms/node_classification.pyzalgorithms/non_randomness.pyz"algorithms/shortest_paths/dense.pylinalg/bethehessianmatrix.pyzlinalg/laplacianmatrix.pyzutils/misc.py"algorithms/centrality/laplacian.py)r2   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.pyr3   zalgorithms/similarity.pyconvert_matrix.pyzdrawing/layout.pyz"generators/spectral_graph_forge.pyzlinalg/algebraicconnectivity.pyzlinalg/attrmatrix.pyr4   zlinalg/graphmatrix.pyzlinalg/modularitymatrix.pyzlinalg/spectrum.pyzutils/rcm.pyr5   zdrawing/nx_pylab.pyr6   zdrawing/nx_agraph.pyzdrawing/nx_pydot.pyzalgorithms/polynomials.py)"__doc__sysr)   r   r   r   r   r#   fixturer-   r1   numpy	has_numpyImportErrorscipy	has_scipy
matplotlibhas_matplotlibpandas
has_pandas
pygraphvizhas_pygraphvizpydot	has_pydotsympy	has_sympycollect_ignoreneeds_numpyneeds_scipyneeds_matplotlibneeds_pandasneeds_pygraphvizneeds_pydotneeds_sympyr,   r   r   <module>rQ      s4    


     I I I' ' ' # # #L ' ' 'LLLII   IIILLLII   IIINN   NNNMMMJJ   JJJNN   NNNLLLII   IIILLLII   III 
 
 
  < ** #$*+ $%*+ "k!N "k!N '&&N #l"N '&&N "k!N "k!NNN" "s~   A A"!A"&A- -A76A7;B BBB B! B!%B, ,B65B6:C C
CC C C 